Re: [PATCH 11/15] ubd: use bvec_virt

From
Anton Ivanov <anton.ivanov@cambridgegreys.com>
Date
2021-08-04 10:11:08
Also in
ceph-devel, dm-devel, linux-bcache, linux-block, linux-nvme, linux-raid, linux-s390, linux-scsi, linux-um
Reply to
Christoph Hellwig, 2021-08-04

On 04/08/2021 10:56, Christoph Hellwig wrote:
quoted hunk ↗ jump to hunk
Use bvec_virt instead of open coding it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
  arch/um/drivers/ubd_kern.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index e497185dd393..cd9dc0556e91 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -1268,8 +1268,7 @@ static void ubd_map_req(struct ubd *dev, struct io_thread_req *io_req,
  		rq_for_each_segment(bvec, req, iter) {
  			BUG_ON(i >= io_req->desc_cnt);
  
-			io_req->io_desc[i].buffer =
-				page_address(bvec.bv_page) + bvec.bv_offset;
+			io_req->io_desc[i].buffer = bvec_virt(&bvec);
  			io_req->io_desc[i].length = bvec.bv_len;
  			i++;
  		}
Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com>

-- 
Anton R. Ivanov
Cambridgegreys Limited. Registered in England. Company Number 10273661
https://www.cambridgegreys.com/
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Thread (21 messages) 21 messages, 5 authors, last reply 2021-08-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help