diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2023-12-19 01:18:31 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-12-22 23:15:35 +0100 |
commit | b2cb9f9ef240b4afaa1838b74fad077f17682f61 (patch) | |
tree | 7e0ee9a5359dd511850c213c50031a24e35c119e /net/ipv4/inet_timewait_sock.c | |
parent | tcp: Check hlist_empty(&tb->bhash2) instead of hlist_empty(&tb->owners). (diff) | |
download | linux-b2cb9f9ef240b4afaa1838b74fad077f17682f61.tar.xz linux-b2cb9f9ef240b4afaa1838b74fad077f17682f61.zip |
tcp: Unlink sk from bhash.
Now we do not use tb->owners and can unlink sockets from bhash.
sk_bind_node/tw_bind_node are available for bhash2 and will be
used in the following patch.
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_timewait_sock.c')
-rw-r--r-- | net/ipv4/inet_timewait_sock.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index 466d4faa9272..547583a87bd3 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c @@ -35,7 +35,6 @@ void inet_twsk_bind_unhash(struct inet_timewait_sock *tw, if (!tb) return; - __hlist_del(&tw->tw_bind_node); tw->tw_tb = NULL; __hlist_del(&tw->tw_bind2_node); @@ -94,12 +93,6 @@ static void inet_twsk_add_node_rcu(struct inet_timewait_sock *tw, hlist_nulls_add_head_rcu(&tw->tw_node, list); } -static void inet_twsk_add_bind_node(struct inet_timewait_sock *tw, - struct hlist_head *list) -{ - hlist_add_head(&tw->tw_bind_node, list); -} - static void inet_twsk_add_bind2_node(struct inet_timewait_sock *tw, struct hlist_head *list) { @@ -133,7 +126,6 @@ void inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk, tw->tw_tb = icsk->icsk_bind_hash; WARN_ON(!icsk->icsk_bind_hash); - inet_twsk_add_bind_node(tw, &tw->tw_tb->owners); tw->tw_tb2 = icsk->icsk_bind2_hash; WARN_ON(!icsk->icsk_bind2_hash); |