Thread (21 messages) 21 messages, 5 authors, 2021-08-16
STALE1757d LANDED

[PATCH 07/15] rbd: use bvec_virt

From: Christoph Hellwig <hch@lst.de>
Date: 2021-08-04 10:04:30
Also in: ceph-devel, dm-devel, linux-bcache, linux-block, linux-nvme, linux-raid, linux-s390, linux-scsi, linux-um
Subsystem: block layer, rados block device (rbd), the rest · Maintainers: Jens Axboe, Ilya Dryomov, Linus Torvalds

Use bvec_virt instead of open coding it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/block/rbd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index 6d596c2c2cd6..e65c9d706f6f 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -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;
-- 
2.30.2

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help