X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=module%2Fzfs%2Fzfs_vfsops.c;h=175dca821462d384530bb8648d5dd5ca6c75509d;hb=4cec9b2dc79c8132ef9093921a0c14529cde775f;hp=8fe457e49151c97d6a04b0609a5da8517e25d217;hpb=04f9432d3bcb15ff8ed6ddc2dc377a4c0264340d;p=zfs.git diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index 8fe457e..175dca8 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -1041,12 +1041,6 @@ zfs_sb_teardown(zfs_sb_t *zsb, boolean_t unmounting) } /* - * 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. */ @@ -1112,9 +1106,9 @@ zfs_sb_teardown(zfs_sb_t *zsb, boolean_t unmounting) /* * Evict cached data */ - if (dmu_objset_is_dirty_anywhere(zsb->z_os)) - if (!zfs_is_readonly(zsb)) - txg_wait_synced(dmu_objset_pool(zsb->z_os), 0); + if (dsl_dataset_is_dirty(dmu_objset_ds(zsb->z_os)) && + !zfs_is_readonly(zsb)) + txg_wait_synced(dmu_objset_pool(zsb->z_os), 0); (void) dmu_objset_evict_dbufs(zsb->z_os); return (0);