mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04: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:
parent
e701df7d61
commit
adec8f4338
1 changed files with 1 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue