X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=module%2Fzfs%2Fzfs_vfsops.c;fp=module%2Fzfs%2Fzfs_vfsops.c;h=602c332eaf53f4478a3b3ba417a6f13c4eae42f8;hb=ab68b6e5db29abcd20c0c7b12a8c2fa570031c8b;hp=e618f2bbf555eba869fabe816c26fd0d7d8f2159;hpb=64d7b6cf75e52a4698d9bdec61745573c39d2e5a;p=zfs.git diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index e618f2b..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 @@ -1480,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); }