diff options
author | Dmitry Yakunin <zeil@yandex-team.ru> | 2020-06-20 18:30:51 +0300 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-06-24 11:21:03 -0700 |
commit | aad4a0a9513af962137c4842463d11ed491eec37 (patch) | |
tree | aeced4846c8207e005ca98ff0ca36e9ddfe78e66 /net | |
parent | dfde1d7dee9bfd095a4f16c9e0579a10f4092e81 (diff) | |
download | linux-aad4a0a9513af962137c4842463d11ed491eec37.tar.gz linux-aad4a0a9513af962137c4842463d11ed491eec37.tar.bz2 linux-aad4a0a9513af962137c4842463d11ed491eec37.zip |
tcp: Expose tcp_sock_set_keepidle_locked
This is preparation for usage in bpf_setsockopt.
v2:
- remove redundant EXPORT_SYMBOL (Alexei Starovoitov)
Signed-off-by: Dmitry Yakunin <zeil@yandex-team.ru>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20200620153052.9439-2-zeil@yandex-team.ru
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/tcp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 810cc164f795..de36c91d32ea 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c @@ -2957,7 +2957,7 @@ void tcp_sock_set_user_timeout(struct sock *sk, u32 val) } EXPORT_SYMBOL(tcp_sock_set_user_timeout); -static int __tcp_sock_set_keepidle(struct sock *sk, int val) +int tcp_sock_set_keepidle_locked(struct sock *sk, int val) { struct tcp_sock *tp = tcp_sk(sk); @@ -2984,7 +2984,7 @@ int tcp_sock_set_keepidle(struct sock *sk, int val) int err; lock_sock(sk); - err = __tcp_sock_set_keepidle(sk, val); + err = tcp_sock_set_keepidle_locked(sk, val); release_sock(sk); return err; } @@ -3183,7 +3183,7 @@ static int do_tcp_setsockopt(struct sock *sk, int level, break; case TCP_KEEPIDLE: - err = __tcp_sock_set_keepidle(sk, val); + err = tcp_sock_set_keepidle_locked(sk, val); break; case TCP_KEEPINTVL: if (val < 1 || val > MAX_TCP_KEEPINTVL) |