aboutsummaryrefslogtreecommitdiff
path: root/sys/cam/ctl/ctl_tpc.c
diff options
context:
space:
mode:
authorAlexander Motin <mav@FreeBSD.org>2014-08-19 17:04:18 +0000
committerAlexander Motin <mav@FreeBSD.org>2014-08-19 17:04:18 +0000
commit2ac1d5afc88e3ac0ba89eb1815989948543674d5 (patch)
tree829d622451e05cc91997258289aba3785da2e4d6 /sys/cam/ctl/ctl_tpc.c
parentf874ca3efd91e97096292b0b7bdc524e22b616d7 (diff)
downloadsrc-2ac1d5afc88e3ac0ba89eb1815989948543674d5.tar.gz
src-2ac1d5afc88e3ac0ba89eb1815989948543674d5.zip
Fix lock recursion on LUN shutdown, introduced on r269497.
MFC after: 3 days
Notes
Notes: svn path=/head/; revision=270176
Diffstat (limited to 'sys/cam/ctl/ctl_tpc.c')
-rw-r--r--sys/cam/ctl/ctl_tpc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/cam/ctl/ctl_tpc.c b/sys/cam/ctl/ctl_tpc.c
index a037189d9ac9..4d41005d2e61 100644
--- a/sys/cam/ctl/ctl_tpc.c
+++ b/sys/cam/ctl/ctl_tpc.c
@@ -228,7 +228,7 @@ ctl_tpc_lun_shutdown(struct ctl_lun *lun)
}
/* Free ROD tokens for this LUN. */
- mtx_lock(&control_softc->ctl_lock);
+ mtx_assert(&control_softc->ctl_lock, MA_OWNED);
TAILQ_FOREACH_SAFE(token, &control_softc->tpc_tokens, links, ttoken) {
if (token->lun != lun->lun || token->active)
continue;
@@ -236,7 +236,6 @@ ctl_tpc_lun_shutdown(struct ctl_lun *lun)
free(token->params, M_CTL);
free(token, M_CTL);
}
- mtx_unlock(&control_softc->ctl_lock);
}
int