diff options
author | Christoph Hellwig <hch@lst.de> | 2020-05-28 07:12:22 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-05-28 11:11:45 -0700 |
commit | c488aeadcbd002a992593e6090d54e8ac27c4310 (patch) | |
tree | 88fa0208206176037a7bd7fba3784e92c00e6988 /net/sunrpc | |
parent | 557eadfcc5ee8f8fa98a795e05ed21db58a65db5 (diff) | |
download | lwn-c488aeadcbd002a992593e6090d54e8ac27c4310.tar.gz lwn-c488aeadcbd002a992593e6090d54e8ac27c4310.zip |
tcp: add tcp_sock_set_user_timeout
Add a helper to directly set the TCP_USER_TIMEOUT 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/sunrpc')
-rw-r--r-- | net/sunrpc/xprtsock.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 399848c2bcb2..231fd6162f68 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -2115,8 +2115,7 @@ static void xs_tcp_set_socket_timeouts(struct rpc_xprt *xprt, (char *)&keepcnt, sizeof(keepcnt)); /* TCP user timeout (see RFC5482) */ - kernel_setsockopt(sock, SOL_TCP, TCP_USER_TIMEOUT, - (char *)&timeo, sizeof(timeo)); + tcp_sock_set_user_timeout(sock->sk, timeo); } static void xs_tcp_set_connect_timeout(struct rpc_xprt *xprt, |