diff options
author | Kuniyuki Iwashima <kuniyu@amazon.com> | 2023-12-19 09:18:33 +0900 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-12-22 22:15:35 +0000 |
commit | 8191792c18c55ee444588100cf0464bd8c0bf5f3 (patch) | |
tree | 4cd74b2f95a306a0a4b015318e8884092ef55a3a /net/ipv4/inet_connection_sock.c | |
parent | tcp: Link sk and twsk to tb2->owners using skc_bind_node. (diff) | |
download | linux-8191792c18c55ee444588100cf0464bd8c0bf5f3.tar.xz linux-8191792c18c55ee444588100cf0464bd8c0bf5f3.zip |
tcp: Remove dead code and fields for bhash2.
Now all sockets including TIME_WAIT are linked to bhash2 using
sock_common.skc_bind_node.
We no longer use inet_bind2_bucket.deathrow, sock.sk_bind2_node,
and inet_timewait_sock.tw_bind2_node.
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_connection_sock.c')
-rw-r--r-- | net/ipv4/inet_connection_sock.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c index 1e19f85bce20..8e2eb1793685 100644 --- a/net/ipv4/inet_connection_sock.c +++ b/net/ipv4/inet_connection_sock.c @@ -216,7 +216,6 @@ static bool inet_bhash2_conflict(const struct sock *sk, bool relax, bool reuseport_cb_ok, bool reuseport_ok) { - struct inet_timewait_sock *tw2; struct sock *sk2; sk_for_each_bound(sk2, &tb2->owners) { @@ -225,14 +224,6 @@ static bool inet_bhash2_conflict(const struct sock *sk, return true; } - twsk_for_each_bound_bhash2(tw2, &tb2->deathrow) { - sk2 = (struct sock *)tw2; - - if (__inet_bhash2_conflict(sk, sk2, sk_uid, relax, - reuseport_cb_ok, reuseport_ok)) - return true; - } - return false; } @@ -240,10 +231,6 @@ static bool inet_bhash2_conflict(const struct sock *sk, hlist_for_each_entry(__tb2, &(__tb)->bhash2, bhash_node) \ sk_for_each_bound(sk2, &(__tb2)->owners) -#define twsk_for_each_bound_bhash(__sk, __tb2, __tb) \ - hlist_for_each_entry(__tb2, &(__tb)->bhash2, bhash_node) \ - sk_for_each_bound_bhash2(sk2, &(__tb2)->deathrow) - /* This should be called only when the tb and tb2 hashbuckets' locks are held */ static int inet_csk_bind_conflict(const struct sock *sk, const struct inet_bind_bucket *tb, @@ -283,14 +270,6 @@ static int inet_csk_bind_conflict(const struct sock *sk, return true; } - twsk_for_each_bound_bhash(sk2, tb2, tb) { - if (!inet_bind_conflict(sk, sk2, uid, relax, reuseport_cb_ok, reuseport_ok)) - continue; - - if (inet_rcv_saddr_equal(sk, sk2, true)) - return true; - } - return false; } |