rbd: use bvec_virt

Use bvec_virt instead of open coding it.

Signed-off-by: Christoph Hellwig <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
Christoph Hellwig
2021-08-16 10:50:33 -06:00
committed by Jens Axboe
parent fbc27241e5
commit cf58b53778
+1 -2
View File
@@ -2986,8 +2986,7 @@ static bool is_zero_bvecs(struct bio_vec *bvecs, u32 bytes)
};
ceph_bvec_iter_advance_step(&it, bytes, ({
if (memchr_inv(page_address(bv.bv_page) + bv.bv_offset, 0,
bv.bv_len))
if (memchr_inv(bvec_virt(&bv), 0, bv.bv_len))
return false;
}));
return true;