summaryrefslogtreecommitdiffstats
path: root/sys/dev/md
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2004-09-18 09:16:19 +0000
committerpjd <pjd@FreeBSD.org>2004-09-18 09:16:19 +0000
commit06ac376bea024a085d5072be82ad9f643399e95d (patch)
tree3966f4c07bd0f91eefa44e4176c5b1883665488a /sys/dev/md
parent31cf3d2f81b4e729ec89a116ddde8bb3b937c265 (diff)
downloadFreeBSD-src-06ac376bea024a085d5072be82ad9f643399e95d.zip
FreeBSD-src-06ac376bea024a085d5072be82ad9f643399e95d.tar.gz
Actually this order (unlock, wakeup) in this case is race-safe and can
save us 2 context switches. Explained by: njl
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 caee7cf..6fcb02c 100644
--- a/sys/dev/md/md.c
+++ b/sys/dev/md/md.c
@@ -375,8 +375,8 @@ g_md_start(struct bio *bp)
sc = bp->bio_to->geom->softc;
mtx_lock(&sc->queue_mtx);
bioq_disksort(&sc->bio_queue, bp);
- wakeup(sc);
mtx_unlock(&sc->queue_mtx);
+ wakeup(sc);
}
OpenPOWER on IntegriCloud