Skip to content

Commit

Permalink
rbd: use bvec_virt
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Aug 16, 2021
1 parent fbc2724 commit cf58b53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/block/rbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit cf58b53

Please sign in to comment.