diff options
author | dillon <dillon@FreeBSD.org> | 1999-09-27 00:27:32 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 1999-09-27 00:27:32 +0000 |
commit | b09937d8f3744997aab502521d1c0e3d115fcf44 (patch) | |
tree | 0e61832b53ca4babe414497eb29b51de2ab9e4fb /sys | |
parent | 510b76a3231122a74e1824a1c14c8871ebab2b17 (diff) | |
download | FreeBSD-src-b09937d8f3744997aab502521d1c0e3d115fcf44.zip FreeBSD-src-b09937d8f3744997aab502521d1c0e3d115fcf44.tar.gz |
If the request crosses EOF and bp->b_bcount is not a multiple of
the sector size, the new value for bp->b_bcount was incorrectly
calculated. Fixed.
Submitted by: Tor.Egge@fast.no
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/vn/vn.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/dev/vn/vn.c b/sys/dev/vn/vn.c index 377c37d..2994fda 100644 --- a/sys/dev/vn/vn.c +++ b/sys/dev/vn/vn.c @@ -334,8 +334,7 @@ vnstrategy(struct buf *bp) * If the request crosses EOF, truncate the request. */ if (pbn + sz > vn->sc_size) { - bp->b_bcount -= (pbn + sz - vn->sc_size) * - vn->sc_secsize; + bp->b_bcount = (vn->sc_size - pbn) * vn->sc_secsize; bp->b_resid = bp->b_bcount; } bp->b_pblkno = pbn; |