dcssblk: use bvec_virt
Use bvec_virt instead of open coding it. Signed-off-by: Christoph Hellwig <hch@lst.de> Link: https://lore.kernel.org/r/20210804095634.460779-15-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
bf5fb875b4
commit
2b7a811221
|
@ -892,8 +892,7 @@ dcssblk_submit_bio(struct bio *bio)
|
|||
|
||||
index = (bio->bi_iter.bi_sector >> 3);
|
||||
bio_for_each_segment(bvec, bio, iter) {
|
||||
page_addr = (unsigned long)
|
||||
page_address(bvec.bv_page) + bvec.bv_offset;
|
||||
page_addr = (unsigned long)bvec_virt(&bvec);
|
||||
source_addr = dev_info->start + (index<<12) + bytes_done;
|
||||
if (unlikely((page_addr & 4095) != 0) || (bvec.bv_len & 4095) != 0)
|
||||
// More paranoia.
|
||||
|
|
Loading…
Reference in New Issue