Skip to content

Commit 61353a6

Browse files
Christoph Hellwigaxboe
Christoph Hellwig
authored andcommitted
block: take offset into account in blk_bvec_map_sg again
The rebase of commit 09595e0 ("block: pass a phys_addr_t to get_max_segment_size") lost adding the total to to the offset in blk_bvec_map_sg. Add it back. Fixes: 09595e0 ("block: pass a phys_addr_t to get_max_segment_size") Reported-by: Yi Zhang <[email protected]> Reported-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 0ffc46e commit 61353a6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

block/blk-merge.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,8 @@ static unsigned blk_bvec_map_sg(struct request_queue *q,
491491

492492
while (nbytes > 0) {
493493
unsigned offset = bvec->bv_offset + total;
494-
unsigned len = get_max_segment_size(&q->limits, bvec_phys(bvec),
495-
nbytes);
494+
unsigned len = get_max_segment_size(&q->limits,
495+
bvec_phys(bvec) + total, nbytes);
496496
struct page *page = bvec->bv_page;
497497

498498
/*

0 commit comments

Comments
 (0)