diff --git a/module/os/linux/zfs/zfs_vfsops.c b/module/os/linux/zfs/zfs_vfsops.c index 5aeaffac9..a3837f784 100644 --- a/module/os/linux/zfs/zfs_vfsops.c +++ b/module/os/linux/zfs/zfs_vfsops.c @@ -279,12 +279,13 @@ zfs_sync(struct super_block *sb, int wait, cred_t *cr) return (err); /* - * If the system is shutting down, then skip any - * filesystems which may exist on a suspended pool. + * If the pool is suspended, just return an error. This is to help + * with shutting down with pools suspended, as we don't want to block + * in that case. */ if (spa_suspended(zfsvfs->z_os->os_spa)) { zfs_exit(zfsvfs, FTAG); - return (0); + return (SET_ERROR(EIO)); } zil_commit(zfsvfs->z_log, 0);