diff options
author | David S. Miller <davem@davemloft.net> | 2020-05-28 21:11:46 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-28 21:11:46 +0300 |
commit | 1e372dbd683dbecbaa7b0c0ac392d13bf07c7aad (patch) | |
tree | 79271cfd7014dfd17cdb32495757374c7e1c18c4 /net/rds/tcp.c | |
parent | 1eba1110f0a7a2faa88b8bd1fc5516870bda387b (diff) | |
parent | 095ae612530c9465df6d372d688cb30c6abfc5f5 (diff) | |
download | linux-1e372dbd683dbecbaa7b0c0ac392d13bf07c7aad.tar.xz |
Merge branch 'remove-most-callers-of-kernel_setsockopt-v3'
Christoph Hellwig says:
====================
remove most callers of kernel_setsockopt v3
this series removes most callers of the kernel_setsockopt functions, and
instead switches their users to small functions that implement setting a
sockopt directly using a normal kernel function call with type safety and
all the other benefits of not having a function call.
In some cases these functions seem pretty heavy handed as they do
a lock_sock even for just setting a single variable, but this mirrors
the real setsockopt implementation unlike a few drivers that just set
set the fields directly.
Changes since v2:
- drop the separately merged kernel_getopt_removal
- drop the sctp patches, as there is conflicting cleanup going on
- add an additional ACK for the rxrpc changes
Changes since v1:
- use ->getname for sctp sockets in dlm
- add a new ->bind_add struct proto method for dlm/sctp
- switch the ipv6 and remaining sctp helpers to inline function so that
the ipv6 and sctp modules are not pulled in by any module that could
potentially use ipv6 or sctp connections
- remove arguments to various sock_* helpers that are always used with
the same constant arguments
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds/tcp.c')
-rw-r--r-- | net/rds/tcp.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/net/rds/tcp.c b/net/rds/tcp.c index 46782fac4c16..43db0eca911f 100644 --- a/net/rds/tcp.c +++ b/net/rds/tcp.c @@ -89,15 +89,6 @@ static struct ctl_table rds_tcp_sysctl_table[] = { { } }; -/* doing it this way avoids calling tcp_sk() */ -void rds_tcp_nonagle(struct socket *sock) -{ - int val = 1; - - kernel_setsockopt(sock, SOL_TCP, TCP_NODELAY, (void *)&val, - sizeof(val)); -} - u32 rds_tcp_write_seq(struct rds_tcp_connection *tc) { /* seq# of the last byte of data in tcp send buffer */ @@ -502,7 +493,7 @@ void rds_tcp_tune(struct socket *sock) struct net *net = sock_net(sk); struct rds_tcp_net *rtn = net_generic(net, rds_tcp_netid); - rds_tcp_nonagle(sock); + tcp_sock_set_nodelay(sock->sk); lock_sock(sk); if (rtn->sndbuf_size > 0) { sk->sk_sndbuf = rtn->sndbuf_size; |