Skip to content

Commit b4a8e74

Browse files
q2venkuba-moo
authored andcommitted
dccp: Inline dccp_listen_start().
This patch inlines dccp_listen_start() and removes a stale comment in inet_dccp_listen() so that it looks like inet_listen(). Signed-off-by: Kuniyuki Iwashima <[email protected]> Reviewed-by: Richard Sailer <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent e704939 commit b4a8e74

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

net/dccp/proto.c

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -238,17 +238,6 @@ void dccp_destroy_sock(struct sock *sk)
238238

239239
EXPORT_SYMBOL_GPL(dccp_destroy_sock);
240240

241-
static inline int dccp_listen_start(struct sock *sk)
242-
{
243-
struct dccp_sock *dp = dccp_sk(sk);
244-
245-
dp->dccps_role = DCCP_ROLE_LISTEN;
246-
/* do not start to listen if feature negotiation setup fails */
247-
if (dccp_feat_finalise_settings(dp))
248-
return -EPROTO;
249-
return inet_csk_listen_start(sk);
250-
}
251-
252241
static inline int dccp_need_reset(int state)
253242
{
254243
return state != DCCP_CLOSED && state != DCCP_LISTEN &&
@@ -931,11 +920,17 @@ int inet_dccp_listen(struct socket *sock, int backlog)
931920
* we can only allow the backlog to be adjusted.
932921
*/
933922
if (old_state != DCCP_LISTEN) {
934-
/*
935-
* FIXME: here it probably should be sk->sk_prot->listen_start
936-
* see tcp_listen_start
937-
*/
938-
err = dccp_listen_start(sk);
923+
struct dccp_sock *dp = dccp_sk(sk);
924+
925+
dp->dccps_role = DCCP_ROLE_LISTEN;
926+
927+
/* do not start to listen if feature negotiation setup fails */
928+
if (dccp_feat_finalise_settings(dp)) {
929+
err = -EPROTO;
930+
goto out;
931+
}
932+
933+
err = inet_csk_listen_start(sk);
939934
if (err)
940935
goto out;
941936
}

0 commit comments

Comments
 (0)