]> git.kernelconcepts.de Git - karo-tx-linux.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)
commitfc01538f9fb75572c969ca9988176ffc2a8741d6
tree51125f77aaa93b73953f7d3189c1e2a13a904490
parent3fd2f1b9d91284afb957ab9899a83279d0e09f29
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>
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