From affa47065329ff7e79acd70fdbcf52eb93592a47 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Tue, 7 Sep 2004 07:54:45 +0000 Subject: [PATCH] Use bioq_takefirst() --- sys/dev/md/md.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 607c492dbc7a..e18dd10f5169 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -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);