diff options
author | Brian Behlendorf <behlendorf1@llnl.gov> | 2017-01-13 15:29:32 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-13 15:29:32 -0800 |
commit | 9775e98844c393229183ebbbd75a877cd8a3a293 (patch) | |
tree | 8eb23a18cbdd9dff6050a9f18bde6d7e542d1cbb | |
parent | e254c8d8ee8783fd547165d4a754f9d8d9d386c4 (diff) |
OpenZFS 7181 - race between zfs_mount and zfs_ioc_rollback
Authored by: Andriy Gapon <andriy.gapon@clusterhq.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Reviewed-by: Richard Yao <ryao@gentoo.org>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
OpenZFS-issue: https://www.illumos.org/issues/7181
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/90f2c09
Closes #5585
-rw-r--r-- | module/zfs/zfs_vfsops.c | 14 |
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); |