diff options
author | Brian Behlendorf <[email protected]> | 2017-01-13 15:29:32 -0800 |
---|---|---|
committer | GitHub <[email protected]> | 2017-01-13 15:29:32 -0800 |
commit | 9775e98844c393229183ebbbd75a877cd8a3a293 (patch) | |
tree | 8eb23a18cbdd9dff6050a9f18bde6d7e542d1cbb /module/zfs/zfs_vfsops.c | |
parent | e254c8d8ee8783fd547165d4a754f9d8d9d386c4 (diff) |
OpenZFS 7181 - race between zfs_mount and zfs_ioc_rollback
Authored by: Andriy Gapon <[email protected]>
Reviewed by: Matthew Ahrens <[email protected]>
Approved by: Gordon Ross <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Reviewed-by: Giuseppe Di Natale <[email protected]>
Ported-by: Brian Behlendorf <[email protected]>
OpenZFS-issue: https://www.illumos.org/issues/7181
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/90f2c09
Closes #5585
Diffstat (limited to 'module/zfs/zfs_vfsops.c')
-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); |