Skip to content

Commit e227c8c

Browse files
committed
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/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent e67645b commit e227c8c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io_uring/net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ static int io_recv_buf_select(struct io_kiocb *req, struct io_async_msghdr *kmsg
10761076
}
10771077

10781078
if (kmsg->msg.msg_inq > 1)
1079-
arg.max_len = min_not_zero(sr->len, kmsg->msg.msg_inq);
1079+
arg.max_len = min_not_zero(*len, kmsg->msg.msg_inq);
10801080

10811081
ret = io_buffers_peek(req, &arg);
10821082
if (unlikely(ret < 0))

0 commit comments

Comments
 (0)