summaryrefslogtreecommitdiff
path: root/drivers/vhost/vringh.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/vhost/vringh.c')
-rw-r--r--drivers/vhost/vringh.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/vhost/vringh.c b/drivers/vhost/vringh.c
index 33eb941fcf15..a1e27da54481 100644
--- a/drivers/vhost/vringh.c
+++ b/drivers/vhost/vringh.c
@@ -1126,9 +1126,8 @@ static int iotlb_translate(const struct vringh *vrh,
size = map->size - addr + map->start;
pa = map->addr + addr - map->start;
pfn = pa >> PAGE_SHIFT;
- iov[ret].bv_page = pfn_to_page(pfn);
- iov[ret].bv_len = min(len - s, size);
- iov[ret].bv_offset = pa & (PAGE_SIZE - 1);
+ bvec_set_page(&iov[ret], pfn_to_page(pfn), min(len - s, size),
+ pa & (PAGE_SIZE - 1));
s += size;
addr += size;
++ret;