Skip to content

Commit

Permalink
Illumos openzfs#4322
Browse files Browse the repository at this point in the history
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>
Closes openzfs#1886
  • Loading branch information
chrisrd committed Nov 19, 2013
1 parent 64ad2b2 commit bb145f1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions module/zfs/dsl_userhold.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down

0 comments on commit bb145f1

Please sign in to comment.