diff options
Diffstat (limited to 'sys/dev/md/md.c')
-rw-r--r-- | sys/dev/md/md.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 4564aa69..0d3d918 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); |