mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
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
This commit is contained in:
parent
e254c8d8ee
commit
9775e98844
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user