X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzfs_vfsops.c;h=2575638870528545e42a78d6fab2dffb154d0672;hb=e2e7aa2df88708cdcae87688a69ba3f5d1cc43ed;hp=803607484efd856b8a9cbd1e18e571afc64f6bae;hpb=0de19dad9cbca9ac89aea1c7742f131713ef8012;p=zfs.git diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index 8036074..2575638 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -1088,10 +1088,16 @@ zfsvfs_teardown(zfs_sb_t *zsb, boolean_t unmounting) * for non-snapshots. */ shrink_dcache_sb(zsb->z_parent->z_sb); - invalidate_inodes(zsb->z_parent->z_sb); + (void) spl_invalidate_inodes(zsb->z_parent->z_sb, 0); } /* + * Drain the iput_taskq to ensure all active references to the + * zfs_sb_t have been handled only then can it be safely destroyed. + */ + taskq_wait(dsl_pool_iput_taskq(dmu_objset_pool(zsb->z_os))); + + /* * Close the zil. NB: Can't close the zil while zfs_inactive * threads are blocked as zil_close can call zfs_inactive. */ @@ -1206,9 +1212,7 @@ zfs_domount(struct super_block *sb, void *data, int silent) /* Set callback operations for the file system. */ sb->s_op = &zpl_super_operations; sb->s_xattr = zpl_xattr_handlers; -#ifdef HAVE_EXPORTS - sb->s_export_op = &zpl_export_operations; -#endif /* HAVE_EXPORTS */ + sb->s_export_op = &zpl_export_operations; /* Set features for file system. */ zfs_set_fuid_feature(zsb);