rbd: use bvec_virt

Use bvec_virt instead of open coding it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Link: https://lore.kernel.org/r/20210804095634.460779-8-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Christoph Hellwig 2021-08-04 11:56:26 +02:00 committed by Jens Axboe
parent fbc27241e5
commit cf58b53778

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;