mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-08-29 11:42:36 +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:
parent
e67645bb7f
commit
e227c8cdb4
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user