aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/rds
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-05-28 07:12:24 +0200
committerDavid S. Miller <davem@davemloft.net>2020-05-28 11:11:45 -0700
commitd41ecaac903c9f4658a71d4e7a708673cfb5abba (patch)
tree331fe773fd40fda6cd7469c3c05e5671019ce703 /net/rds
parenttcp: add tcp_sock_set_keepidle (diff)
downloadwireguard-linux-d41ecaac903c9f4658a71d4e7a708673cfb5abba.tar.xz
wireguard-linux-d41ecaac903c9f4658a71d4e7a708673cfb5abba.zip
tcp: add tcp_sock_set_keepintvl
Add a helper to directly set the TCP_KEEPINTVL sockopt from kernel space without going through a fake uaccess. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rds')
-rw-r--r--net/rds/tcp_listen.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/rds/tcp_listen.c b/net/rds/tcp_listen.c
index 79f9adc00811..9ad555c48d15 100644
--- a/net/rds/tcp_listen.c
+++ b/net/rds/tcp_listen.c
@@ -53,12 +53,10 @@ int rds_tcp_keepalive(struct socket *sock)
goto bail;
tcp_sock_set_keepidle(sock->sk, keepidle);
-
/* KEEPINTVL is the interval between successive probes. We follow
* the model in xs_tcp_finish_connecting() and re-use keepidle.
*/
- ret = kernel_setsockopt(sock, IPPROTO_TCP, TCP_KEEPINTVL,
- (char *)&keepidle, sizeof(keepidle));
+ tcp_sock_set_keepintvl(sock->sk, keepidle);
bail:
return ret;
}