summaryrefslogtreecommitdiff
path: root/sys/dev/md
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2005-09-11 12:35:32 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2005-09-11 12:35:32 +0000
commit9fbea3e365da38becc108f8cc29442e55880eae8 (patch)
treee9044713805213642cb55da301a37469854bfd79 /sys/dev/md
parent922e338183b53c227ff1d61c0dc539b2b6629e00 (diff)
Notes
Diffstat (limited to 'sys/dev/md')
-rw-r--r--sys/dev/md/md.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index cb21e4d86ef2..230f93b0a407 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -944,7 +944,6 @@ mddestroy(struct md_s *sc, struct thread *td)
GIANT_REQUIRED;
- mtx_destroy(&sc->queue_mtx);
if (sc->gp) {
sc->gp->softc = NULL;
g_waitfor_event(md_zapit, sc->gp, M_WAITOK, sc->gp, NULL);
@@ -955,6 +954,7 @@ mddestroy(struct md_s *sc, struct thread *td)
wakeup(sc);
while (sc->procp != NULL)
tsleep(&sc->procp, PRIBIO, "mddestroy", hz / 10);
+ mtx_destroy(&sc->queue_mtx);
if (sc->vnode != NULL)
(void)vn_close(sc->vnode, sc->flags & MD_READONLY ?
FREAD : (FREAD|FWRITE), sc->cred, td);