[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250919083706.1863217-2-kuniyu@google.com>
Date: Fri, 19 Sep 2025 08:35:28 +0000
From: Kuniyuki Iwashima <kuniyu@...gle.com>
To: Eric Dumazet <edumazet@...gle.com>, Neal Cardwell <ncardwell@...gle.com>,
"David S. Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>
Cc: Simon Horman <horms@...nel.org>, Xuanqiang Luo <xuanqiang.luo@...ux.dev>,
Kuniyuki Iwashima <kuniyu@...gle.com>, Kuniyuki Iwashima <kuni1840@...il.com>, netdev@...r.kernel.org
Subject: [PATCH v1 net-next 1/3] tcp: Remove osk from __inet_hash() arg.
__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@...gle.com>
---
include/net/inet_hashtables.h | 2 +-
net/ipv4/inet_hashtables.c | 6 +++---
net/ipv6/inet6_hashtables.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index a3b32241c2f2..64bc8870db88 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -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);
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index ef4ccfd46ff6..baee5c075e6c 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -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;
}
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
index a3a9ea49fee2..64fcd7df0c9a 100644
--- a/net/ipv6/inet6_hashtables.c
+++ b/net/ipv6/inet6_hashtables.c
@@ -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;
}
--
2.51.0.470.ga7dc726c21-goog
Powered by blists - more mailing lists