diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-05-09 09:31:05 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-05-13 18:19:19 -0600 |
commit | 0645fbe760afcc5332c858d1cbf416bf77ef3c29 (patch) | |
tree | 98c6d89241b44bc3ce553580407268bbf2a78e25 /io_uring | |
parent | 92ef0fd55ac80dfc2e4654edfe5d1ddfa6e070fe (diff) | |
download | linux-stable-0645fbe760afcc5332c858d1cbf416bf77ef3c29.tar.gz linux-stable-0645fbe760afcc5332c858d1cbf416bf77ef3c29.tar.bz2 linux-stable-0645fbe760afcc5332c858d1cbf416bf77ef3c29.zip |
net: have do_accept() take a struct proto_accept_arg argument
In preparation for passing in more information via this API, change
do_accept() to take a proto_accept_arg struct pointer rather than just
the file flags separately.
No functional changes in this patch.
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r-- | io_uring/net.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/io_uring/net.c b/io_uring/net.c index 070dea9a4eda..d4d1fc93635c 100644 --- a/io_uring/net.c +++ b/io_uring/net.c @@ -1528,8 +1528,10 @@ int io_accept(struct io_kiocb *req, unsigned int issue_flags) { struct io_accept *accept = io_kiocb_to_cmd(req, struct io_accept); bool force_nonblock = issue_flags & IO_URING_F_NONBLOCK; - unsigned int file_flags = force_nonblock ? O_NONBLOCK : 0; bool fixed = !!accept->file_slot; + struct proto_accept_arg arg = { + .flags = force_nonblock ? O_NONBLOCK : 0, + }; struct file *file; int ret, fd; @@ -1543,7 +1545,7 @@ retry: if (unlikely(fd < 0)) return fd; } - file = do_accept(req->file, file_flags, accept->addr, accept->addr_len, + file = do_accept(req->file, &arg, accept->addr, accept->addr_len, accept->flags); if (IS_ERR(file)) { if (!fixed) |