Skip to content

Commit e5bacf2

Browse files
Steven Hartlandbehlendorf
authored andcommitted
Illumos #4322
4322 ZFS deadlock on dp_config_rwlock Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Ilya Usvyatsky <ilya.usvyatsky@nexenta.com> Approved by: Dan McDonald <danmcd@nexenta.com> References: https://www.illumos.org/issues/4322 illumos/illumos-gate@c50d56f Ported by: Chris Dunlop <chris@onthe.net.au> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #1886
1 parent fd23663 commit e5bacf2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

module/zfs/dsl_userhold.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,21 +571,23 @@ dsl_dataset_user_release_impl(nvlist_t *holds, nvlist_t *errlist,
571571
ddura.ddura_holdfunc = dsl_dataset_hold_obj_string;
572572
pool = spa_name(tmpdp->dp_spa);
573573
#ifdef _KERNEL
574-
dsl_pool_config_enter(tmpdp, FTAG);
575574
for (pair = nvlist_next_nvpair(holds, NULL); pair != NULL;
576575
pair = nvlist_next_nvpair(holds, pair)) {
577576
dsl_dataset_t *ds;
578577

578+
dsl_pool_config_enter(tmpdp, FTAG);
579579
error = dsl_dataset_hold_obj_string(tmpdp,
580580
nvpair_name(pair), FTAG, &ds);
581581
if (error == 0) {
582582
char name[MAXNAMELEN];
583583
dsl_dataset_name(ds, name);
584+
dsl_pool_config_exit(tmpdp, FTAG);
584585
dsl_dataset_rele(ds, FTAG);
585586
(void) zfs_unmount_snap(name);
587+
} else {
588+
dsl_pool_config_exit(tmpdp, FTAG);
586589
}
587590
}
588-
dsl_pool_config_exit(tmpdp, FTAG);
589591
#endif
590592
} else {
591593
/* Non-temporary holds are specified by name. */

0 commit comments

Comments
 (0)