summaryrefslogtreecommitdiffstats
path: root/io_uring
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2023-02-03 16:06:29 +0100
committerJens Axboe <axboe@kernel.dk>2023-02-03 18:17:42 +0100
commitcc342a21930f0e3862c5fd0871cd5a65c5b59e27 (patch)
treeb051a0770eab42f645852b42aca7cc43e82b8681 /io_uring
parentsplice: use bvec_set_page to initialize a bvec (diff)
downloadlinux-cc342a21930f0e3862c5fd0871cd5a65c5b59e27.tar.xz
linux-cc342a21930f0e3862c5fd0871cd5a65c5b59e27.zip
io_uring: use bvec_set_page to initialize a bvec
Use the bvec_set_page helper to initialize a bvec. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com> Link: https://lore.kernel.org/r/20230203150634.3199647-19-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/rsrc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c
index 18de10c68a15..a59fc02de598 100644
--- a/io_uring/rsrc.c
+++ b/io_uring/rsrc.c
@@ -1237,9 +1237,7 @@ static int io_sqe_buffer_register(struct io_ring_ctx *ctx, struct iovec *iov,
size_t vec_len;
vec_len = min_t(size_t, size, PAGE_SIZE - off);
- imu->bvec[i].bv_page = pages[i];
- imu->bvec[i].bv_len = vec_len;
- imu->bvec[i].bv_offset = off;
+ bvec_set_page(&imu->bvec[i], pages[i], vec_len, off);
off = 0;
size -= vec_len;
}