]> git.baikalelectronics.ru Git - kernel.git/commit
inet: simplify timewait refcounting
authorEric Dumazet <edumazet@google.com>
Wed, 8 Jul 2015 21:28:29 +0000 (14:28 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Jul 2015 22:12:20 +0000 (15:12 -0700)
commit99bba87f3c087f6b1d0922eb5159ddb9925bd3d8
tree51125f77aaa93b73953f7d3189c1e2a13a904490
parent033f31124ba3b234d2b3a17df408249cd71b124e
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
22141b14f191f ("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>
include/net/inet_hashtables.h
include/net/inet_timewait_sock.h
net/ipv4/inet_hashtables.c
net/ipv4/inet_timewait_sock.c
net/ipv6/inet6_hashtables.c