Commit b4a8e749 authored by Kuniyuki Iwashima's avatar Kuniyuki Iwashima Committed by Jakub Kicinski

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: default avatarKuniyuki Iwashima <kuniyu@amazon.co.jp>
Reviewed-by: default avatarRichard Sailer <richard_siegfried@systemli.org>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent e7049395
...@@ -238,17 +238,6 @@ void dccp_destroy_sock(struct sock *sk) ...@@ -238,17 +238,6 @@ void dccp_destroy_sock(struct sock *sk)
EXPORT_SYMBOL_GPL(dccp_destroy_sock); EXPORT_SYMBOL_GPL(dccp_destroy_sock);
static inline int dccp_listen_start(struct sock *sk)
{
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);
}
static inline int dccp_need_reset(int state) static inline int dccp_need_reset(int state)
{ {
return state != DCCP_CLOSED && state != DCCP_LISTEN && return state != DCCP_CLOSED && state != DCCP_LISTEN &&
...@@ -931,11 +920,17 @@ int inet_dccp_listen(struct socket *sock, int backlog) ...@@ -931,11 +920,17 @@ int inet_dccp_listen(struct socket *sock, int backlog)
* we can only allow the backlog to be adjusted. * we can only allow the backlog to be adjusted.
*/ */
if (old_state != DCCP_LISTEN) { if (old_state != DCCP_LISTEN) {
/* struct dccp_sock *dp = dccp_sk(sk);
* FIXME: here it probably should be sk->sk_prot->listen_start
* see tcp_listen_start dp->dccps_role = DCCP_ROLE_LISTEN;
*/
err = dccp_listen_start(sk); /* 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) if (err)
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment