The rebase of commit 09595e0c9d65 ("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: 09595e0c9d65 ("block: pass a phys_addr_t to get_max_segment_size") Reported-by: Yi Zhang <yi.zhang@xxxxxxxxxx> Reported-by: Chaitanya Kulkarni <chaitanyak@xxxxxxxxxx> Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- block/blk-merge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/block/blk-merge.c b/block/blk-merge.c index e41ea331809936..048d07a5091f79 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -491,8 +491,8 @@ static unsigned blk_bvec_map_sg(struct request_queue *q, while (nbytes > 0) { unsigned offset = bvec->bv_offset + total; - unsigned len = get_max_segment_size(&q->limits, bvec_phys(bvec), - nbytes); + unsigned len = get_max_segment_size(&q->limits, + bvec_phys(bvec) + total, nbytes); struct page *page = bvec->bv_page; /* -- 2.43.0