Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@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>

authored by

Kuniyuki Iwashima and committed by
Jakub Kicinski
6445bb83 50d51cef

+5 -5
+1 -1
include/net/inet_hashtables.h
··· 289 289 bool inet_ehash_insert(struct sock *sk, struct sock *osk, bool *found_dup_sk); 290 290 bool inet_ehash_nolisten(struct sock *sk, struct sock *osk, 291 291 bool *found_dup_sk); 292 - int __inet_hash(struct sock *sk, struct sock *osk); 292 + int __inet_hash(struct sock *sk); 293 293 int inet_hash(struct sock *sk); 294 294 void inet_unhash(struct sock *sk); 295 295
+3 -3
net/ipv4/inet_hashtables.c
··· 739 739 return reuseport_alloc(sk, inet_rcv_saddr_any(sk)); 740 740 } 741 741 742 - int __inet_hash(struct sock *sk, struct sock *osk) 742 + int __inet_hash(struct sock *sk) 743 743 { 744 744 struct inet_hashinfo *hashinfo = tcp_get_hashinfo(sk); 745 745 struct inet_listen_hashbucket *ilb2; ··· 747 747 748 748 if (sk->sk_state != TCP_LISTEN) { 749 749 local_bh_disable(); 750 - inet_ehash_nolisten(sk, osk, NULL); 750 + inet_ehash_nolisten(sk, NULL, NULL); 751 751 local_bh_enable(); 752 752 return 0; 753 753 } ··· 779 779 int err = 0; 780 780 781 781 if (sk->sk_state != TCP_CLOSE) 782 - err = __inet_hash(sk, NULL); 782 + err = __inet_hash(sk); 783 783 784 784 return err; 785 785 }
+1 -1
net/ipv6/inet6_hashtables.c
··· 374 374 int err = 0; 375 375 376 376 if (sk->sk_state != TCP_CLOSE) 377 - err = __inet_hash(sk, NULL); 377 + err = __inet_hash(sk); 378 378 379 379 return err; 380 380 }