mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
BACKPORT: tcp: Expose tcp_sock_set_keepidle_locked
This is preparation for usage in bpf_setsockopt. v2: - remove redundant EXPORT_SYMBOL (Alexei Starovoitov) Change-Id: Ie696e9bcc4d92c21210e07cdc35cfb9acb48303c 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
This commit is contained in:
parent
259e678a87
commit
bb6c2b3f3e
2 changed files with 4 additions and 3 deletions
|
|
@ -503,6 +503,7 @@ static inline u16 tcp_mss_clamp(const struct tcp_sock *tp, u16 mss)
|
|||
int tcp_skb_shift(struct sk_buff *to, struct sk_buff *from, int pcount,
|
||||
int shiftlen);
|
||||
|
||||
int tcp_sock_set_keepidle_locked(struct sock *sk, int val);
|
||||
int tcp_sock_set_keepidle(struct sock *sk, int val);
|
||||
|
||||
#endif /* _LINUX_TCP_H */
|
||||
|
|
|
|||
|
|
@ -2837,7 +2837,7 @@ static void tcp_enable_tx_delay(void)
|
|||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
|
|
@ -2864,7 +2864,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;
|
||||
}
|
||||
|
|
@ -3077,7 +3077,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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue