aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/zfs_vfsops.c
diff options
context:
space:
mode:
Diffstat (limited to 'module/zfs/zfs_vfsops.c')
-rw-r--r--module/zfs/zfs_vfsops.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c
index 3c76cfe6f..65efcdce5 100644
--- a/module/zfs/zfs_vfsops.c
+++ b/module/zfs/zfs_vfsops.c
@@ -911,13 +911,6 @@ zfs_sb_setup(zfs_sb_t *zsb, boolean_t mounting)
if (error)
return (error);
- /*
- * Set the objset user_ptr to track its zsb.
- */
- mutex_enter(&zsb->z_os->os_user_ptr_lock);
- dmu_objset_set_user(zsb->z_os, zsb);
- mutex_exit(&zsb->z_os->os_user_ptr_lock);
-
zsb->z_log = zil_open(zsb->z_os, zfs_get_data);
/*
@@ -981,6 +974,13 @@ zfs_sb_setup(zfs_sb_t *zsb, boolean_t mounting)
readonly_changed_cb(zsb, B_TRUE);
}
+ /*
+ * Set the objset user_ptr to track its zsb.
+ */
+ mutex_enter(&zsb->z_os->os_user_ptr_lock);
+ dmu_objset_set_user(zsb->z_os, zsb);
+ mutex_exit(&zsb->z_os->os_user_ptr_lock);
+
return (0);
}
EXPORT_SYMBOL(zfs_sb_setup);