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