diff options
author | Christoph Hellwig <hch@lst.de> | 2024-07-09 09:01:25 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-07-09 01:02:44 -0600 |
commit | 61353a63a22890f2c642232ae1ab4a2e02e6a27c (patch) | |
tree | 104f356b0f6548a0211749a7f34f9343444fc64b /block | |
parent | 0ffc46eb1b6d0b9dd07e4f2b1019edd4fe678b9e (diff) |
block: take offset into account in blk_bvec_map_sg again
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@redhat.com>
Reported-by: Chaitanya Kulkarni <chaitanyak@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240709070126.3019940-1-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-merge.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index 1bce85479092..de5281bcadc5 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; /* |