summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/aac/aac_disk.c7
-rw-r--r--sys/dev/amr/amr_disk.c4
-rw-r--r--sys/dev/ata/ata-disk.c7
-rw-r--r--sys/dev/ata/ata-raid.c7
-rw-r--r--sys/dev/ata/atapi-fd.c7
-rw-r--r--sys/dev/ida/ida_disk.c6
-rw-r--r--sys/dev/mlx/mlx_disk.c4
-rw-r--r--sys/dev/twe/twe_freebsd.c8
-rw-r--r--sys/kern/subr_disk.c6
9 files changed, 6 insertions, 50 deletions
diff --git a/sys/dev/aac/aac_disk.c b/sys/dev/aac/aac_disk.c
index 09bd971..564f79e 100644
--- a/sys/dev/aac/aac_disk.c
+++ b/sys/dev/aac/aac_disk.c
@@ -168,13 +168,6 @@ aac_disk_strategy(struct bio *bp)
return;
}
- /* do-nothing operation? */
- if (bp->bio_bcount == 0) {
- bp->bio_resid = bp->bio_bcount;
- biodone(bp);
- return;
- }
-
/* perform accounting */
devstat_start_transaction(&sc->ad_stats);
diff --git a/sys/dev/amr/amr_disk.c b/sys/dev/amr/amr_disk.c
index f846043..de703fe 100644
--- a/sys/dev/amr/amr_disk.c
+++ b/sys/dev/amr/amr_disk.c
@@ -165,10 +165,6 @@ amrd_strategy(struct bio *bio)
goto bad;
}
- /* do-nothing operation */
- if (bio->bio_bcount == 0)
- goto done;
-
devstat_start_transaction(&sc->amrd_stats);
amr_submit_bio(sc->amrd_controller, bio);
return;
diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c
index 6d44958..d4a2b9c 100644
--- a/sys/dev/ata/ata-disk.c
+++ b/sys/dev/ata/ata-disk.c
@@ -269,13 +269,6 @@ adstrategy(struct bio *bp)
return;
}
- /* if it's a null transfer, return immediatly. */
- if (bp->bio_bcount == 0) {
- bp->bio_resid = 0;
- biodone(bp);
- return;
- }
-
s = splbio();
bioqdisksort(&adp->queue, bp);
ata_start(adp->controller);
diff --git a/sys/dev/ata/ata-raid.c b/sys/dev/ata/ata-raid.c
index 30cbd76..546b998 100644
--- a/sys/dev/ata/ata-raid.c
+++ b/sys/dev/ata/ata-raid.c
@@ -158,13 +158,6 @@ arstrategy(struct bio *bp)
int lba, count, chunk;
caddr_t data;
- /* if it's a null transfer, return immediatly. */
- if (bp->bio_bcount == 0) {
- bp->bio_resid = 0;
- biodone(bp);
- return;
- }
-
bp->bio_resid = bp->bio_bcount;
lba = bp->bio_pblkno;
data = bp->bio_data;
diff --git a/sys/dev/ata/atapi-fd.c b/sys/dev/ata/atapi-fd.c
index a831ff4..a419d2b 100644
--- a/sys/dev/ata/atapi-fd.c
+++ b/sys/dev/ata/atapi-fd.c
@@ -307,13 +307,6 @@ afdstrategy(struct bio *bp)
return;
}
- /* if it's a null transfer, return immediatly. */
- if (bp->bio_bcount == 0) {
- bp->bio_resid = 0;
- biodone(bp);
- return;
- }
-
s = splbio();
bioqdisksort(&fdp->queue, bp);
ata_start(fdp->atp->controller);
diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c
index 99251ef..4bf662c 100644
--- a/sys/dev/ida/ida_disk.c
+++ b/sys/dev/ida/ida_disk.c
@@ -169,12 +169,6 @@ idad_strategy(struct bio *bp)
goto bad;
}
- /*
- * If it's a null transfer, return immediately
- */
- if (bp->bio_bcount == 0)
- goto done;
-
bp->bio_driver1 = drv;
s = splbio();
devstat_start_transaction(&drv->stats);
diff --git a/sys/dev/mlx/mlx_disk.c b/sys/dev/mlx/mlx_disk.c
index 18698c2..b372247 100644
--- a/sys/dev/mlx/mlx_disk.c
+++ b/sys/dev/mlx/mlx_disk.c
@@ -179,10 +179,6 @@ mlxd_strategy(struct bio *bp)
goto bad;
}
- /* do-nothing operation */
- if (bp->bio_bcount == 0)
- goto done;
-
devstat_start_transaction(&sc->mlxd_stats);
mlx_submit_buf(sc->mlxd_controller, bp);
return;
diff --git a/sys/dev/twe/twe_freebsd.c b/sys/dev/twe/twe_freebsd.c
index 15c5574..677e7af 100644
--- a/sys/dev/twe/twe_freebsd.c
+++ b/sys/dev/twe/twe_freebsd.c
@@ -668,14 +668,6 @@ twed_strategy(twe_bio *bp)
return;
}
- /* do-nothing operation? */
- if (TWE_BIO_LENGTH(bp) == 0) {
- TWE_BIO_RESID(bp) = 0;
- TWE_BIO_DONE(bp);
- TWED_BIO_OUT;
- return;
- }
-
/* perform accounting */
TWE_BIO_STATS_START(bp);
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c
index b4932cb..aaa28c8 100644
--- a/sys/kern/subr_disk.c
+++ b/sys/kern/subr_disk.c
@@ -309,6 +309,12 @@ diskstrategy(struct bio *bp)
return;
}
+ if (bp->bio_bcount == 0) {
+ bp->bio_resid = 0;
+ biodone(bp);
+ return;
+ }
+
KASSERT(dp->d_devsw != NULL, ("NULL devsw"));
KASSERT(dp->d_devsw->d_strategy != NULL, ("NULL d_strategy"));
dp->d_devsw->d_strategy(bp);
OpenPOWER on IntegriCloud