diff options
author | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-04-01 15:06:26 +0000 |
---|---|---|
committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2003-04-01 15:06:26 +0000 |
commit | 891619a66d5e01e5d5db6a11cfd7f26c815338e3 (patch) | |
tree | f08dda1f60d395e9bc94bf2fd1921768bf958c6d /sys/dev/ata/atapi-tape.c | |
parent | 29f3f095a624492078f7578be83d684fc32fb2a9 (diff) | |
download | src-891619a66d5e01e5d5db6a11cfd7f26c815338e3.tar.gz src-891619a66d5e01e5d5db6a11cfd7f26c815338e3.zip |
Use bioq_flush() to drain a bio queue with a specific error code.
Retain the mistake of not updating the devstat API for now.
Spell bioq_disksort() consistently with the remaining bioq_*().
#include <geom/geom_disk.h> where this is more appropriate.
Notes
Notes:
svn path=/head/; revision=112946
Diffstat (limited to 'sys/dev/ata/atapi-tape.c')
-rw-r--r-- | sys/dev/ata/atapi-tape.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/sys/dev/ata/atapi-tape.c b/sys/dev/ata/atapi-tape.c index 31bf97f90eb3..e21a0e68294e 100644 --- a/sys/dev/ata/atapi-tape.c +++ b/sys/dev/ata/atapi-tape.c @@ -145,12 +145,8 @@ void astdetach(struct ata_device *atadev) { struct ast_softc *stp = atadev->driver; - struct bio *bp; - while ((bp = bioq_first(&stp->queue))) { - bioq_remove(&stp->queue, bp); - biofinish(bp, NULL, ENXIO); - } + bioq_flush(&stp->queue, NULL, ENXIO); destroy_dev(stp->dev1); destroy_dev(stp->dev2); devstat_remove_entry(stp->stats); |