]> www.infradead.org Git - users/hch/misc.git/commitdiff
tcp: Remove osk from __inet_hash() arg.
authorKuniyuki Iwashima <kuniyu@google.com>
Fri, 19 Sep 2025 08:35:28 +0000 (08:35 +0000)
committerJakub Kicinski <kuba@kernel.org>
Mon, 22 Sep 2025 18:38:42 +0000 (11:38 -0700)
__inet_hash() is called from inet_hash() and inet6_hash with osk NULL.

Let's remove the 2nd arg from __inet_hash().

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250919083706.1863217-2-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/inet_hashtables.h
net/ipv4/inet_hashtables.c
net/ipv6/inet6_hashtables.c

index a3b32241c2f24feb7e6002f7dec60c17314340bc..64bc8870db8851b51e41cf1a40cdef3d608fac90 100644 (file)
@@ -289,7 +289,7 @@ int inet_hashinfo2_init_mod(struct inet_hashinfo *h);
 bool inet_ehash_insert(struct sock *sk, struct sock *osk, bool *found_dup_sk);
 bool inet_ehash_nolisten(struct sock *sk, struct sock *osk,
                         bool *found_dup_sk);
-int __inet_hash(struct sock *sk, struct sock *osk);
+int __inet_hash(struct sock *sk);
 int inet_hash(struct sock *sk);
 void inet_unhash(struct sock *sk);
 
index ef4ccfd46ff6740e48ffff0556c2e5703632aaa6..baee5c075e6cec9afb5652602e4ffe72e257d93e 100644 (file)
@@ -739,7 +739,7 @@ static int inet_reuseport_add_sock(struct sock *sk,
        return reuseport_alloc(sk, inet_rcv_saddr_any(sk));
 }
 
-int __inet_hash(struct sock *sk, struct sock *osk)
+int __inet_hash(struct sock *sk)
 {
        struct inet_hashinfo *hashinfo = tcp_get_hashinfo(sk);
        struct inet_listen_hashbucket *ilb2;
@@ -747,7 +747,7 @@ int __inet_hash(struct sock *sk, struct sock *osk)
 
        if (sk->sk_state != TCP_LISTEN) {
                local_bh_disable();
-               inet_ehash_nolisten(sk, osk, NULL);
+               inet_ehash_nolisten(sk, NULL, NULL);
                local_bh_enable();
                return 0;
        }
@@ -779,7 +779,7 @@ int inet_hash(struct sock *sk)
        int err = 0;
 
        if (sk->sk_state != TCP_CLOSE)
-               err = __inet_hash(sk, NULL);
+               err = __inet_hash(sk);
 
        return err;
 }
index a3a9ea49fee2bd0c1816bfd75c8ef21fa971fa8f..64fcd7df0c9aa84ea0e1ae6a879b96a5535341e0 100644 (file)
@@ -374,7 +374,7 @@ int inet6_hash(struct sock *sk)
        int err = 0;
 
        if (sk->sk_state != TCP_CLOSE)
-               err = __inet_hash(sk, NULL);
+               err = __inet_hash(sk);
 
        return err;
 }