diff options
author | Christoph Hellwig <hch@lst.de> | 2024-07-06 09:52:17 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-07-08 01:51:05 -0600 |
commit | 25f76c3db2f08428b5acd082a52787164001eb6e (patch) | |
tree | 7c73e1146750721b46a0869742cff0d4b3282a86 /block/bio.c | |
parent | bf86bcdb40123ee99669ee91b67e023669433a1a (diff) | |
download | linux-stable-25f76c3db2f08428b5acd082a52787164001eb6e.tar.gz linux-stable-25f76c3db2f08428b5acd082a52787164001eb6e.tar.bz2 linux-stable-25f76c3db2f08428b5acd082a52787164001eb6e.zip |
block: add a bvec_phys helper
Get callers out of poking into bvec internals a bit more. Not a huge win
right now, but with the proposed new DMA mapping API we might end up with
a lot more of this otherwise.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20240706075228.2350978-2-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bio.c')
-rw-r--r-- | block/bio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/bio.c b/block/bio.c index e9e809a63c59..a3b1b2266c50 100644 --- a/block/bio.c +++ b/block/bio.c @@ -953,7 +953,7 @@ bool bvec_try_merge_hw_page(struct request_queue *q, struct bio_vec *bv, bool *same_page) { unsigned long mask = queue_segment_boundary(q); - phys_addr_t addr1 = page_to_phys(bv->bv_page) + bv->bv_offset; + phys_addr_t addr1 = bvec_phys(bv); phys_addr_t addr2 = page_to_phys(page) + offset + len - 1; if ((addr1 | mask) != (addr2 | mask)) |