summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/fs/zfs/zfs_vfsops.c
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2016-11-22 12:56:16 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2016-11-22 12:56:16 +0000
commitdec418ad77ca1ad8b6560e627d4f4d4cee27ab5c (patch)
tree8b010779fbe156ed1462f203170b948386ec6023 /usr/src/uts/common/fs/zfs/zfs_vfsops.c
parent0e094404f4a199a440ac665b3442f89891352798 (diff)
parent90f2c094b3822f4825f21cef2c2faf7d03b55139 (diff)
downloadillumos-joyent-dec418ad77ca1ad8b6560e627d4f4d4cee27ab5c.tar.gz
[illumos-gate merge]
commit 90f2c094b3822f4825f21cef2c2faf7d03b55139 7181 race between zfs_mount and zfs_ioc_rollback commit 3faa67c4f6f8f33a78fe84ef48445aeb0ce858d3 7566 Add kernel environment variables under smbios.system. commit c079fa4d202eff15e318131c52755d214ffa2da7 6428 set canmount=off on unmounted filesystem tries to unmount children commit bfaed0b91e57062c38bc16b4f89db3c8f0052a9b 7199 dsl_dataset_rollback_sync may try to free already free blocks 7200 no blocks must be born in a txg after a snaphot is created commit edb901aab9c738b5eb15aa55933e82b0f2f9d9a2 7386 zfs get does not work properly with bookmarks commit 690041b9caf801816f2d0bac90bc7cecefb73523 7180 potential race between zfs_suspend_fs+zfs_resume_fs and zfs_ioc_rename commit e5b103bba9ae456b34ffc1e123d7e81d4584a945 7596 iwn: Firmware update for 6205 (Taylor Peak)
Diffstat (limited to 'usr/src/uts/common/fs/zfs/zfs_vfsops.c')
-rw-r--r--usr/src/uts/common/fs/zfs/zfs_vfsops.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/usr/src/uts/common/fs/zfs/zfs_vfsops.c b/usr/src/uts/common/fs/zfs/zfs_vfsops.c
index f069e3553e..9e0a8c0ed8 100644
--- a/usr/src/uts/common/fs/zfs/zfs_vfsops.c
+++ b/usr/src/uts/common/fs/zfs/zfs_vfsops.c
@@ -1020,13 +1020,6 @@ zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t mounting)
if (error)
return (error);
- /*
- * Set the objset user_ptr to track its zfsvfs.
- */
- mutex_enter(&zfsvfs->z_os->os_user_ptr_lock);
- dmu_objset_set_user(zfsvfs->z_os, zfsvfs);
- mutex_exit(&zfsvfs->z_os->os_user_ptr_lock);
-
zfsvfs->z_log = zil_open(zfsvfs->z_os, zfs_get_data);
/*
@@ -1087,6 +1080,13 @@ zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t mounting)
zfsvfs->z_vfs->vfs_flag |= readonly; /* restore readonly bit */
}
+ /*
+ * Set the objset user_ptr to track its zfsvfs.
+ */
+ mutex_enter(&zfsvfs->z_os->os_user_ptr_lock);
+ dmu_objset_set_user(zfsvfs->z_os, zfsvfs);
+ mutex_exit(&zfsvfs->z_os->os_user_ptr_lock);
+
return (0);
}
@@ -2032,7 +2032,7 @@ zfs_suspend_fs(zfsvfs_t *zfsvfs)
* zfsvfs, held, and long held on entry.
*/
int
-zfs_resume_fs(zfsvfs_t *zfsvfs, const char *osname)
+zfs_resume_fs(zfsvfs_t *zfsvfs, dsl_dataset_t *ds)
{
int err;
znode_t *zp;
@@ -2041,14 +2041,13 @@ zfs_resume_fs(zfsvfs_t *zfsvfs, const char *osname)
ASSERT(RW_WRITE_HELD(&zfsvfs->z_teardown_inactive_lock));
/*
- * We already own this, so just hold and rele it to update the
- * objset_t, as the one we had before may have been evicted.
+ * We already own this, so just update the objset_t, as the one we
+ * had before may have been evicted.
*/
objset_t *os;
- VERIFY0(dmu_objset_hold(osname, zfsvfs, &os));
- VERIFY3P(os->os_dsl_dataset->ds_owner, ==, zfsvfs);
- VERIFY(dsl_dataset_long_held(os->os_dsl_dataset));
- dmu_objset_rele(os, zfsvfs);
+ VERIFY3P(ds->ds_owner, ==, zfsvfs);
+ VERIFY(dsl_dataset_long_held(ds));
+ VERIFY0(dmu_objset_from_ds(ds, &os));
err = zfsvfs_init(zfsvfs, os);
if (err != 0)