@@ -138,53 +138,8 @@ extern unsigned int dccp_sync_mss(struct sock *sk, u32 pmtu);
138138extern const char * dccp_packet_name (const int type );
139139extern const char * dccp_state_name (const int state );
140140
141- static inline void dccp_set_state (struct sock * sk , const int state )
142- {
143- const int oldstate = sk -> sk_state ;
144-
145- dccp_pr_debug ("%s(%p) %-10.10s -> %s\n" ,
146- dccp_role (sk ), sk ,
147- dccp_state_name (oldstate ), dccp_state_name (state ));
148- WARN_ON (state == oldstate );
149-
150- switch (state ) {
151- case DCCP_OPEN :
152- if (oldstate != DCCP_OPEN )
153- DCCP_INC_STATS (DCCP_MIB_CURRESTAB );
154- break ;
155-
156- case DCCP_CLOSED :
157- if (oldstate == DCCP_CLOSING || oldstate == DCCP_OPEN )
158- DCCP_INC_STATS (DCCP_MIB_ESTABRESETS );
159-
160- sk -> sk_prot -> unhash (sk );
161- if (inet_csk (sk )-> icsk_bind_hash != NULL &&
162- !(sk -> sk_userlocks & SOCK_BINDPORT_LOCK ))
163- inet_put_port (& dccp_hashinfo , sk );
164- /* fall through */
165- default :
166- if (oldstate == DCCP_OPEN )
167- DCCP_DEC_STATS (DCCP_MIB_CURRESTAB );
168- }
169-
170- /* Change state AFTER socket is unhashed to avoid closed
171- * socket sitting in hash tables.
172- */
173- sk -> sk_state = state ;
174- }
175-
176- static inline void dccp_done (struct sock * sk )
177- {
178- dccp_set_state (sk , DCCP_CLOSED );
179- dccp_clear_xmit_timers (sk );
180-
181- sk -> sk_shutdown = SHUTDOWN_MASK ;
182-
183- if (!sock_flag (sk , SOCK_DEAD ))
184- sk -> sk_state_change (sk );
185- else
186- inet_csk_destroy_sock (sk );
187- }
141+ extern void dccp_set_state (struct sock * sk , const int state );
142+ extern void dccp_done (struct sock * sk );
188143
189144static inline void dccp_openreq_init (struct request_sock * req ,
190145 struct dccp_sock * dp ,
0 commit comments