diff options
author | phk <phk@FreeBSD.org> | 2001-05-08 08:24:54 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2001-05-08 08:24:54 +0000 |
commit | b424c063ea41a4965ded650a52865cba19f636f5 (patch) | |
tree | af35fa883f2c3722307fde817144c2f540c652ad /sys/kern/subr_disk.c | |
parent | 8476412152694863a0e6cc7dda24348533cf9d4e (diff) | |
download | FreeBSD-src-b424c063ea41a4965ded650a52865cba19f636f5.zip FreeBSD-src-b424c063ea41a4965ded650a52865cba19f636f5.tar.gz |
Always initialize bio_resid from bio_bcount in the disk mini-layer so
that the drivers don't have to do it umpteen times.
Diffstat (limited to 'sys/kern/subr_disk.c')
-rw-r--r-- | sys/kern/subr_disk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index aaa28c8..5e90426 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -296,6 +296,7 @@ diskstrategy(struct bio *bp) pdev = dkmodpart(dkmodslice(bp->bio_dev, WHOLE_DISK_SLICE), RAW_PART); dp = pdev->si_disk; + bp->bio_resid = bp->bio_bcount; if (dp != bp->bio_dev->si_disk) inherit_raw(pdev, bp->bio_dev); @@ -310,7 +311,6 @@ diskstrategy(struct bio *bp) } if (bp->bio_bcount == 0) { - bp->bio_resid = 0; biodone(bp); return; } |