tcp/dccp: avoid one atomic operation for timewait hashdance
authorEric Dumazet <edumazet@google.com>
Tue, 12 Dec 2017 05:25:12 +0000 (21:25 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 Dec 2017 19:33:10 +0000 (14:33 -0500)
commitec94c2696f0bcd5ae92a553244e4ac30d2171a2d
tree1a9eebba8042da0292f583f778abbe72974cc2a2
parent1e7570117575360504e632d0c31d6b52d3d7ea9c
tcp/dccp: avoid one atomic operation for timewait hashdance

First, rename __inet_twsk_hashdance() to inet_twsk_hashdance()

Then, remove one inet_twsk_put() by setting tw_refcnt to 3 instead
of 4, but adding a fat warning that we do not have the right to access
tw anymore after inet_twsk_hashdance()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_timewait_sock.h
net/dccp/minisocks.c
net/ipv4/inet_timewait_sock.c
net/ipv4/tcp_minisocks.c