Use bioq_takefirst()
This commit is contained in:
parent
1a31a6c3b2
commit
affa470653
@ -619,9 +619,7 @@ md_kthread(void *arg)
|
|||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
mtx_lock(&sc->queue_mtx);
|
mtx_lock(&sc->queue_mtx);
|
||||||
bp = bioq_first(&sc->bio_queue);
|
bp = bioq_takefirst(&sc->bio_queue);
|
||||||
if (bp)
|
|
||||||
bioq_remove(&sc->bio_queue, bp);
|
|
||||||
if (!bp) {
|
if (!bp) {
|
||||||
if (sc->flags & MD_SHUTDOWN) {
|
if (sc->flags & MD_SHUTDOWN) {
|
||||||
mtx_unlock(&sc->queue_mtx);
|
mtx_unlock(&sc->queue_mtx);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user