aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/md
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2004-03-05 22:42:17 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2004-03-05 22:42:17 +0000
commit6074439965095d5265de872bb966a1a743edb724 (patch)
tree0cb8679f9d812640e447455f4abf4169ae910cac /sys/dev/md
parent12dd6da62c8dcd06a0b3c408c81b25edcbb3bf9e (diff)
Notes
Diffstat (limited to 'sys/dev/md')
-rw-r--r--sys/dev/md/md.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c
index 4564aa690d6ee..0d3d9189cd498 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -638,8 +638,8 @@ md_kthread(void *arg)
mtx_unlock(&sc->queue_mtx);
sc->procp = NULL;
wakeup(&sc->procp);
- if (!hasgiant)
- mtx_lock(&Giant);
+ if (hasgiant)
+ mtx_unlock(&Giant);
kthread_exit(0);
}
msleep(sc, &sc->queue_mtx, PRIBIO | PDROP, "mdwait", 0);