summaryrefslogtreecommitdiffstats
path: root/sys/dev/vn/vn.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/vn/vn.c')
-rw-r--r--sys/dev/vn/vn.c3
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;
OpenPOWER on IntegriCloud