diff options
author | Steven Hartland <[email protected]> | 2013-11-20 00:48:28 +1100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2013-11-20 15:27:32 -0800 |
commit | e5bacf2109943b813e77185cffb7db07747a6d9c (patch) | |
tree | 7b41dd72a9002e7acf24d9a55fa7bbd6723c5191 | |
parent | fd2366300025ef7b836d80d629bd505c10693b4f (diff) |
Illumos #4322
4322 ZFS deadlock on dp_config_rwlock
Reviewed by: Matthew Ahrens <[email protected]>
Reviewed by: Ilya Usvyatsky <[email protected]>
Approved by: Dan McDonald <[email protected]>
References:
https://www.illumos.org/issues/4322
illumos/illumos-gate@c50d56f667f119d78fa3d94d6bef2c298ba556f6
Ported by: Chris Dunlop <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #1886
-rw-r--r-- | module/zfs/dsl_userhold.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/module/zfs/dsl_userhold.c b/module/zfs/dsl_userhold.c index 1fca66afb..97775b591 100644 --- a/module/zfs/dsl_userhold.c +++ b/module/zfs/dsl_userhold.c @@ -571,21 +571,23 @@ dsl_dataset_user_release_impl(nvlist_t *holds, nvlist_t *errlist, ddura.ddura_holdfunc = dsl_dataset_hold_obj_string; pool = spa_name(tmpdp->dp_spa); #ifdef _KERNEL - dsl_pool_config_enter(tmpdp, FTAG); for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL; pair = nvlist_next_nvpair(holds, pair)) { dsl_dataset_t *ds; + dsl_pool_config_enter(tmpdp, FTAG); error = dsl_dataset_hold_obj_string(tmpdp, nvpair_name(pair), FTAG, &ds); if (error == 0) { char name[MAXNAMELEN]; dsl_dataset_name(ds, name); + dsl_pool_config_exit(tmpdp, FTAG); dsl_dataset_rele(ds, FTAG); (void) zfs_unmount_snap(name); + } else { + dsl_pool_config_exit(tmpdp, FTAG); } } - dsl_pool_config_exit(tmpdp, FTAG); #endif } else { /* Non-temporary holds are specified by name. */ |