diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index 8f1c713c0534..998cfde32fc7 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -1231,7 +1231,7 @@ zfs_preumount(struct super_block *sb) { zfs_sb_t *zsb = sb->s_fs_info; - if (zsb->z_ctldir != NULL) + if (zsb != NULL && zsb->z_ctldir != NULL) zfsctl_destroy(zsb); } EXPORT_SYMBOL(zfs_preumount);