diff options
author | Brian Behlendorf <[email protected]> | 2011-01-06 14:07:41 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2011-02-10 09:27:20 -0800 |
commit | d5e53f9d06d149fbb62920bb5af766059dc35341 (patch) | |
tree | 40e7fc13dc997d5f1258a185b6314918be61bf8b | |
parent | acb53769403aa896b022129f1bdb3d845a4d0201 (diff) |
Disable zfs_sync during oops/panic
Minor update to ensure zfs_sync() is disabled if a kernel oops/panic
is triggered. As the comment says 'data integrity is job one'. This
change could have been done by defining panicstr to oops_in_progress
in the SPL. But I felt it was better to use the native Linux API
here since to be clear.
-rw-r--r-- | module/zfs/zfs_vfsops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index a602c5d62..f5b78aec1 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -75,7 +75,7 @@ zfs_sync(vfs_t *vfsp, short flag, cred_t *cr) * Data integrity is job one. We don't want a compromised kernel * writing to the storage pool, so we never sync during panic. */ - if (panicstr) + if (unlikely(oops_in_progress)) return (0); if (vfsp != NULL) { |