diff options
| author | David S. Miller <davem@davemloft.net> | 2020-05-28 11:11:46 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2020-05-28 11:11:46 -0700 |
| commit | 1e372dbd683dbecbaa7b0c0ac392d13bf07c7aad (patch) | |
| tree | 79271cfd7014dfd17cdb32495757374c7e1c18c4 /net/rds/tcp_send.c | |
| parent | 1eba1110f0a7a2faa88b8bd1fc5516870bda387b (diff) | |
| parent | 095ae612530c9465df6d372d688cb30c6abfc5f5 (diff) | |
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_send.c')
| -rw-r--r-- | net/rds/tcp_send.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/net/rds/tcp_send.c b/net/rds/tcp_send.c index 78a2554a4497..8c4d1d6e9249 100644 --- a/net/rds/tcp_send.c +++ b/net/rds/tcp_send.c @@ -38,23 +38,18 @@ #include "rds.h" #include "tcp.h" -static void rds_tcp_cork(struct socket *sock, int val) -{ - kernel_setsockopt(sock, SOL_TCP, TCP_CORK, (void *)&val, sizeof(val)); -} - void rds_tcp_xmit_path_prepare(struct rds_conn_path *cp) { struct rds_tcp_connection *tc = cp->cp_transport_data; - rds_tcp_cork(tc->t_sock, 1); + tcp_sock_set_cork(tc->t_sock->sk, true); } void rds_tcp_xmit_path_complete(struct rds_conn_path *cp) { struct rds_tcp_connection *tc = cp->cp_transport_data; - rds_tcp_cork(tc->t_sock, 0); + tcp_sock_set_cork(tc->t_sock->sk, false); } /* the core send_sem serializes this with other xmit and shutdown */ |
