X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzfs_vfsops.c;h=602c332eaf53f4478a3b3ba417a6f13c4eae42f8;hb=802e7b5feb0135483de119eac1da192404eb5bb7;hp=f445242380b56ca555791fafe0ceeee8f21a4435;hpb=7973e464de4f93b6e669f7f04a316e013767224e;p=zfs.git diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index f445242..602c332 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -1056,10 +1056,12 @@ zfs_sb_teardown(zfs_sb_t *zsb, boolean_t unmounting) } /* - * Drain the iput_taskq to ensure all active references to the + * If someone has not already unmounted this file system, + * 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))); + if (zsb->z_os) + taskq_wait(dsl_pool_iput_taskq(dmu_objset_pool(zsb->z_os))); /* * Close the zil. NB: Can't close the zil while zfs_inactive @@ -1188,6 +1190,9 @@ zfs_domount(struct super_block *sb, void *data, int silent) sb->s_op = &zpl_super_operations; sb->s_xattr = zpl_xattr_handlers; sb->s_export_op = &zpl_export_operations; +#ifdef HAVE_S_D_OP + sb->s_d_op = &zpl_dentry_operations; +#endif /* HAVE_S_D_OP */ /* Set features for file system. */ zfs_set_fuid_feature(zsb); @@ -1477,10 +1482,11 @@ bail: if (err) { /* - * Since we couldn't reopen zfs_sb_t, force - * unmount this file system. + * Since we couldn't reopen zfs_sb_t or, setup the + * sa framework, force unmount this file system. */ - (void) zfs_umount(zsb->z_sb); + if (zsb->z_os) + (void) zfs_umount(zsb->z_sb); } return (err); } @@ -1534,7 +1540,7 @@ zfs_set_version(zfs_sb_t *zsb, uint64_t newvers) error = zap_add(os, MASTER_NODE_OBJ, ZFS_SA_ATTRS, 8, 1, &sa_obj, tx); - ASSERT3U(error, ==, 0); + ASSERT0(error); VERIFY(0 == sa_set_sa_object(os, sa_obj)); sa_register_update_callback(os, zfs_sa_upgrade);