diff options
author | Eric Dumazet <edumazet@google.com> | 2013-10-11 11:54:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-17 15:02:02 -0400 |
commit | c1d607cc4a8ea1ef89d7f6f5728112bc5a52f2f6 (patch) | |
tree | 4428d703936d39735d9122252357eb94b1d0a435 /net | |
parent | d7a20c86404bb423f843d4fe34cd1d11432892a0 (diff) |
inet_diag: use sock_gen_put()
TCP listener refactoring, part 6 :
Use sock_gen_put() from inet_diag_dump_one_icsk() for future
SYN_RECV support.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/inet_diag.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index 41e1c3ea8b51..56a964a553d2 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
@@ -336,12 +336,9 @@ int inet_diag_dump_one_icsk(struct inet_hashinfo *hashinfo, struct sk_buff *in_s | |||
336 | err = 0; | 336 | err = 0; |
337 | 337 | ||
338 | out: | 338 | out: |
339 | if (sk) { | 339 | if (sk) |
340 | if (sk->sk_state == TCP_TIME_WAIT) | 340 | sock_gen_put(sk); |
341 | inet_twsk_put((struct inet_timewait_sock *)sk); | 341 | |
342 | else | ||
343 | sock_put(sk); | ||
344 | } | ||
345 | out_nosk: | 342 | out_nosk: |
346 | return err; | 343 | return err; |
347 | } | 344 | } |