use bioq_takefirst()

This commit is contained in:
phk 2004-10-23 12:45:39 +00:00
parent 36d79a570a
commit 5ff1936d8d

View File

@ -670,17 +670,14 @@ wdustart(register struct softc *du)
return;
bp = bioq_first(&drive_queue[du->dk_lunit]);
if (bp == NULL) { /* yes, an assign */
bp = bioq_takefirst(&drive_queue[du->dk_lunit]);
if (bp == NULL)
return;
}
/*
* store away which device we came from.
*/
bp->bio_driver1 = du;
bioq_remove(&drive_queue[du->dk_lunit], bp);
/* link onto controller queue */
bioq_insert_tail(&wdtab[ctrlr].controller_queue, bp);