Remove zfs_sync() panicking kernel check

This check provides no real additional protection and unnecessarily
introduces a dependency on the "oops_in_progress" kernel symbol.
Remove the check, it there are special circumstances on other
platforms which make this a requirement it can be reintroduced
for all relevant call paths in a more portable comprehensive manor.

Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #8297
This commit is contained in:
Brian Behlendorf 2019-01-18 11:11:47 -08:00 committed by GitHub
parent b194fab0fb
commit ad63507135
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -258,13 +258,6 @@ zfs_sync(struct super_block *sb, int wait, cred_t *cr)
{
zfsvfs_t *zfsvfs = sb->s_fs_info;
/*
* Data integrity is job one. We don't want a compromised kernel
* writing to the storage pool, so we never sync during panic.
*/
if (unlikely(oops_in_progress))
return (0);
/*
* Semantically, the only requirement is that the sync be initiated.
* The DMU syncs out txgs frequently, so there's nothing to do.