mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-25 07:14:36 +08:00
Merge branch 'dccp-tcp-minor-fixes-for-inet_csk_listen_start'
Kuniyuki Iwashima says: ==================== dccp/tcp: Minor fixes for inet_csk_listen_start(). The first patch removes an unused argument, and the second removes a stale comment. ==================== Link: https://lore.kernel.org/r/20211122101622.50572-1-kuniyu@amazon.co.jp Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
commit
91eddd309c
@ -304,7 +304,7 @@ static inline __poll_t inet_csk_listen_poll(const struct sock *sk)
|
||||
(EPOLLIN | EPOLLRDNORM) : 0;
|
||||
}
|
||||
|
||||
int inet_csk_listen_start(struct sock *sk, int backlog);
|
||||
int inet_csk_listen_start(struct sock *sk);
|
||||
void inet_csk_listen_stop(struct sock *sk);
|
||||
|
||||
void inet_csk_addr2sockaddr(struct sock *sk, struct sockaddr *uaddr);
|
||||
|
@ -238,17 +238,6 @@ void dccp_destroy_sock(struct sock *sk)
|
||||
|
||||
EXPORT_SYMBOL_GPL(dccp_destroy_sock);
|
||||
|
||||
static inline int dccp_listen_start(struct sock *sk, int backlog)
|
||||
{
|
||||
struct dccp_sock *dp = dccp_sk(sk);
|
||||
|
||||
dp->dccps_role = DCCP_ROLE_LISTEN;
|
||||
/* do not start to listen if feature negotiation setup fails */
|
||||
if (dccp_feat_finalise_settings(dp))
|
||||
return -EPROTO;
|
||||
return inet_csk_listen_start(sk, backlog);
|
||||
}
|
||||
|
||||
static inline int dccp_need_reset(int state)
|
||||
{
|
||||
return state != DCCP_CLOSED && state != DCCP_LISTEN &&
|
||||
@ -931,11 +920,17 @@ int inet_dccp_listen(struct socket *sock, int backlog)
|
||||
* we can only allow the backlog to be adjusted.
|
||||
*/
|
||||
if (old_state != DCCP_LISTEN) {
|
||||
/*
|
||||
* FIXME: here it probably should be sk->sk_prot->listen_start
|
||||
* see tcp_listen_start
|
||||
*/
|
||||
err = dccp_listen_start(sk, backlog);
|
||||
struct dccp_sock *dp = dccp_sk(sk);
|
||||
|
||||
dp->dccps_role = DCCP_ROLE_LISTEN;
|
||||
|
||||
/* do not start to listen if feature negotiation setup fails */
|
||||
if (dccp_feat_finalise_settings(dp)) {
|
||||
err = -EPROTO;
|
||||
goto out;
|
||||
}
|
||||
|
||||
err = inet_csk_listen_start(sk);
|
||||
if (err)
|
||||
goto out;
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ int inet_listen(struct socket *sock, int backlog)
|
||||
tcp_fastopen_init_key_once(sock_net(sk));
|
||||
}
|
||||
|
||||
err = inet_csk_listen_start(sk, backlog);
|
||||
err = inet_csk_listen_start(sk);
|
||||
if (err)
|
||||
goto out;
|
||||
tcp_call_bpf(sk, BPF_SOCK_OPS_TCP_LISTEN_CB, 0, NULL);
|
||||
|
@ -1035,7 +1035,7 @@ void inet_csk_prepare_forced_close(struct sock *sk)
|
||||
}
|
||||
EXPORT_SYMBOL(inet_csk_prepare_forced_close);
|
||||
|
||||
int inet_csk_listen_start(struct sock *sk, int backlog)
|
||||
int inet_csk_listen_start(struct sock *sk)
|
||||
{
|
||||
struct inet_connection_sock *icsk = inet_csk(sk);
|
||||
struct inet_sock *inet = inet_sk(sk);
|
||||
|
@ -68,7 +68,7 @@ static void set_task_info(struct sock *sk)
|
||||
}
|
||||
|
||||
SEC("fentry/inet_csk_listen_start")
|
||||
int BPF_PROG(trace_inet_csk_listen_start, struct sock *sk, int backlog)
|
||||
int BPF_PROG(trace_inet_csk_listen_start, struct sock *sk)
|
||||
{
|
||||
set_task_info(sk);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user