mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-08 02:49:48 +00:00
io_uring/net: use passed in 'len' in io_recv_buf_select()
len is a pointer to the desired len, use that rather than grab it from sr->len again. No functional changes as of this patch, but it does prepare io_recv_buf_select() for getting passed in a value that differs from sr->len. Link: https://lore.kernel.org/io-uring/20250709203420.1321689-3-axboe@kernel.dk Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -1076,7 +1076,7 @@ static int io_recv_buf_select(struct io_kiocb *req, struct io_async_msghdr *kmsg
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (kmsg->msg.msg_inq > 1)
|
if (kmsg->msg.msg_inq > 1)
|
||||||
arg.max_len = min_not_zero(sr->len, kmsg->msg.msg_inq);
|
arg.max_len = min_not_zero(*len, kmsg->msg.msg_inq);
|
||||||
|
|
||||||
ret = io_buffers_peek(req, &arg);
|
ret = io_buffers_peek(req, &arg);
|
||||||
if (unlikely(ret < 0))
|
if (unlikely(ret < 0))
|
||||||
|
|||||||
Reference in New Issue
Block a user