Skip to content
Snippets Groups Projects
Commit 2caca8fc authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

block: use page_to_phys in bvec_phys


Use page_to_phys instead of open coding it now that it is available in an
architecture independent way.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250106081437.798213-1-hch@lst.de


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 02ee5d69
No related merge requests found
...@@ -286,12 +286,7 @@ static inline void *bvec_virt(struct bio_vec *bvec) ...@@ -286,12 +286,7 @@ static inline void *bvec_virt(struct bio_vec *bvec)
*/ */
static inline phys_addr_t bvec_phys(const struct bio_vec *bvec) static inline phys_addr_t bvec_phys(const struct bio_vec *bvec)
{ {
/* return page_to_phys(bvec->bv_page) + bvec->bv_offset;
* Note this open codes page_to_phys because page_to_phys is defined in
* <asm/io.h>, which we don't want to pull in here. If it ever moves to
* a sensible place we should start using it.
*/
return PFN_PHYS(page_to_pfn(bvec->bv_page)) + bvec->bv_offset;
} }
#endif /* __LINUX_BVEC_H */ #endif /* __LINUX_BVEC_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment