mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2024-12-29 09:13:38 +00:00
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>
This commit is contained in:
parent
664e40789a
commit
cc342a2193
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user