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.
This commit is contained in:
parent
acb5376940
commit
d5e53f9d06
|
@ -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
|
* Data integrity is job one. We don't want a compromised kernel
|
||||||
* writing to the storage pool, so we never sync during panic.
|
* writing to the storage pool, so we never sync during panic.
|
||||||
*/
|
*/
|
||||||
if (panicstr)
|
if (unlikely(oops_in_progress))
|
||||||
return (0);
|
return (0);
|
||||||
|
|
||||||
if (vfsp != NULL) {
|
if (vfsp != NULL) {
|
||||||
|
|
Loading…
Reference in New Issue