diff options
author | Eric Dumazet <edumazet@google.com> | 2015-07-08 23:28:29 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-07-10 00:12:20 +0200 |
commit | fc01538f9fb75572c969ca9988176ffc2a8741d6 (patch) | |
tree | 51125f77aaa93b73953f7d3189c1e2a13a904490 /include/net/inet_hashtables.h | |
parent | inet: remove BUG_ON() in twsk_destructor() (diff) | |
download | linux-fc01538f9fb75572c969ca9988176ffc2a8741d6.tar.xz linux-fc01538f9fb75572c969ca9988176ffc2a8741d6.zip |
inet: simplify timewait refcounting
timewait sockets have a complex refcounting logic.
Once we realize it should be similar to established and
syn_recv sockets, we can use sk_nulls_del_node_init_rcu()
and remove inet_twsk_unhash()
In particular, deferred inet_twsk_put() added in commit
13475a30b66cd ("tcp: connect() race with timewait reuse")
looks unecessary : When removing a timewait socket from
ehash or bhash, caller must own a reference on the socket
anyway.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/inet_hashtables.h')
-rw-r--r-- | include/net/inet_hashtables.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h index b73c88a19dd4..b07d126694a7 100644 --- a/include/net/inet_hashtables.h +++ b/include/net/inet_hashtables.h @@ -205,8 +205,8 @@ void inet_put_port(struct sock *sk); void inet_hashinfo_init(struct inet_hashinfo *h); -int __inet_hash_nolisten(struct sock *sk, struct inet_timewait_sock *tw); -int __inet_hash(struct sock *sk, struct inet_timewait_sock *tw); +void __inet_hash_nolisten(struct sock *sk, struct sock *osk); +void __inet_hash(struct sock *sk, struct sock *osk); void inet_hash(struct sock *sk); void inet_unhash(struct sock *sk); |