diff options
author | Christoph Hellwig <hch@lst.de> | 2020-05-28 07:12:24 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-28 20:11:45 +0200 |
commit | d41ecaac903c9f4658a71d4e7a708673cfb5abba (patch) | |
tree | 331fe773fd40fda6cd7469c3c05e5671019ce703 /net/rds | |
parent | tcp: add tcp_sock_set_keepidle (diff) | |
download | linux-d41ecaac903c9f4658a71d4e7a708673cfb5abba.tar.xz 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.c | 4 |
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; } |