* [PATCH net-next] inet_diag: use sock_gen_put()
@ 2013-10-11 15:54 Eric Dumazet
2013-10-17 19:02 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2013-10-11 15:54 UTC (permalink / raw)
To: David Miller; +Cc: netdev
From: Eric Dumazet <edumazet@google.com>
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>
---
net/ipv4/inet_diag.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index 41e1c3e..56a964a 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
err = 0;
out:
- if (sk) {
- if (sk->sk_state == TCP_TIME_WAIT)
- inet_twsk_put((struct inet_timewait_sock *)sk);
- else
- sock_put(sk);
- }
+ if (sk)
+ sock_gen_put(sk);
+
out_nosk:
return err;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] inet_diag: use sock_gen_put()
2013-10-11 15:54 [PATCH net-next] inet_diag: use sock_gen_put() Eric Dumazet
@ 2013-10-17 19:02 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2013-10-17 19:02 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 11 Oct 2013 08:54:49 -0700
> From: Eric Dumazet <edumazet@google.com>
>
> 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>
Applied, thanks Eric.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-17 19:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-11 15:54 [PATCH net-next] inet_diag: use sock_gen_put() Eric Dumazet
2013-10-17 19:02 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).