summaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorJohn Poduska <[email protected]>2020-09-17 13:53:02 -0400
committerGitHub <[email protected]>2020-09-17 10:53:02 -0700
commit5bed68bdc410a7ed4fc51a3727ee863a977cc920 (patch)
treec98ec91d52c0b0046d4cdba65c6350d3a964f9d4 /module
parent741b20ce0c8370d5c7cb31cb82c0b040a535e99b (diff)
Need a long hold in zpl_mount_impl
In zpl_mount_impl, there is: dmu_objset_hold ; returns with pool & ds held dsl_pool_rele sget dsl_dataset_rele As spelled out in the "DSL Pool Configuration Lock" in dsl_pool.c, this requires a long hold. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Paul Zuchowski <[email protected]> Signed-off-by: John Poduska <[email protected]> Closes #10936
Diffstat (limited to 'module')
-rw-r--r--module/os/linux/zfs/zpl_super.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/module/os/linux/zfs/zpl_super.c b/module/os/linux/zfs/zpl_super.c
index 5aaf82793..9db8bda4c 100644
--- a/module/os/linux/zfs/zpl_super.c
+++ b/module/os/linux/zfs/zpl_super.c
@@ -274,8 +274,12 @@ zpl_mount_impl(struct file_system_type *fs_type, int flags, zfs_mnt_t *zm)
* a txg sync. If the dsl_pool lock is held over sget()
* this can prevent the pool sync and cause a deadlock.
*/
+ dsl_dataset_long_hold(dmu_objset_ds(os), FTAG);
dsl_pool_rele(dmu_objset_pool(os), FTAG);
+
s = sget(fs_type, zpl_test_super, set_anon_super, flags, os);
+
+ dsl_dataset_long_rele(dmu_objset_ds(os), FTAG);
dsl_dataset_rele(dmu_objset_ds(os), FTAG);
if (IS_ERR(s))