aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/inet_timewait_sock.h
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-07-08 14:28:29 -0700
committerDavid S. Miller <davem@davemloft.net>2015-07-09 15:12:20 -0700
commitfc01538f9fb75572c969ca9988176ffc2a8741d6 (patch)
tree51125f77aaa93b73953f7d3189c1e2a13a904490 /include/net/inet_timewait_sock.h
parentinet: remove BUG_ON() in twsk_destructor() (diff)
downloadlinux-dev-fc01538f9fb75572c969ca9988176ffc2a8741d6.tar.xz
linux-dev-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_timewait_sock.h')
-rw-r--r--include/net/inet_timewait_sock.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
index 360c4802288d..96f52a4711c8 100644
--- a/include/net/inet_timewait_sock.h
+++ b/include/net/inet_timewait_sock.h
@@ -100,10 +100,8 @@ static inline struct inet_timewait_sock *inet_twsk(const struct sock *sk)
void inet_twsk_free(struct inet_timewait_sock *tw);
void inet_twsk_put(struct inet_timewait_sock *tw);
-int inet_twsk_unhash(struct inet_timewait_sock *tw);
-
-int inet_twsk_bind_unhash(struct inet_timewait_sock *tw,
- struct inet_hashinfo *hashinfo);
+void inet_twsk_bind_unhash(struct inet_timewait_sock *tw,
+ struct inet_hashinfo *hashinfo);
struct inet_timewait_sock *inet_twsk_alloc(const struct sock *sk,
struct inet_timewait_death_row *dr,