diff options
Diffstat (limited to 'include/linux/bvec.h')
-rw-r--r-- | include/linux/bvec.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/bvec.h b/include/linux/bvec.h index bd1e361b351c..ba8f52d48b94 100644 --- a/include/linux/bvec.h +++ b/include/linux/bvec.h @@ -280,4 +280,13 @@ static inline void *bvec_virt(struct bio_vec *bvec) return page_address(bvec->bv_page) + bvec->bv_offset; } +/** + * bvec_phys - return the physical address for a bvec + * @bvec: bvec to return the physical address for + */ +static inline phys_addr_t bvec_phys(const struct bio_vec *bvec) +{ + return page_to_phys(bvec->bv_page) + bvec->bv_offset; +} + #endif /* __LINUX_BVEC_H */ |