diff --git a/block/bio.c b/block/bio.c index 0d400ba2dbd18f65cd98f0ffdea563f14b48877c..4312a8085396b6d232b2dfa13c6487bd9eb3db04 100644 --- a/block/bio.c +++ b/block/bio.c @@ -569,7 +569,8 @@ static void bio_truncate(struct bio *bio, unsigned new_size) offset = new_size - done; else offset = 0; - zero_user(bv.bv_page, offset, bv.bv_len - offset); + zero_user(bv.bv_page, bv.bv_offset + offset, + bv.bv_len - offset); truncated = true; } done += bv.bv_len;