1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-17 10:26:15 +00:00

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
This commit is contained in:
Matthew Dillon 1999-09-27 00:27:32 +00:00
parent e701df7d61
commit adec8f4338
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51703

View File

@ -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;