diff options
author | Jens Axboe <axboe@kernel.dk> | 2024-05-09 09:20:08 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2024-05-13 18:19:09 -0600 |
commit | 92ef0fd55ac80dfc2e4654edfe5d1ddfa6e070fe (patch) | |
tree | 7356b1c61b8d9bd942cc517a1050bdecb9c2c5c2 /net/rds | |
parent | fe6532b44af402d0900c5be3e5359f4b293524b1 (diff) | |
download | lwn-92ef0fd55ac80dfc2e4654edfe5d1ddfa6e070fe.tar.gz lwn-92ef0fd55ac80dfc2e4654edfe5d1ddfa6e070fe.zip |
net: change proto and proto_ops accept type
Rather than pass in flags, error pointer, and whether this is a kernel
invocation or not, add a struct proto_accept_arg struct as the argument.
This then holds all of these arguments, and prepares accept for being
able to pass back more information.
No functional changes in this patch.
Acked-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'net/rds')
-rw-r--r-- | net/rds/tcp_listen.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/rds/tcp_listen.c b/net/rds/tcp_listen.c index 05008ce5c421..d89bd8d0c354 100644 --- a/net/rds/tcp_listen.c +++ b/net/rds/tcp_listen.c @@ -105,6 +105,10 @@ int rds_tcp_accept_one(struct socket *sock) int conn_state; struct rds_conn_path *cp; struct in6_addr *my_addr, *peer_addr; + struct proto_accept_arg arg = { + .flags = O_NONBLOCK, + .kern = true, + }; #if !IS_ENABLED(CONFIG_IPV6) struct in6_addr saddr, daddr; #endif @@ -119,7 +123,7 @@ int rds_tcp_accept_one(struct socket *sock) if (ret) goto out; - ret = sock->ops->accept(sock, new_sock, O_NONBLOCK, true); + ret = sock->ops->accept(sock, new_sock, &arg); if (ret < 0) goto out; |