Skip to content

Commit b4d6444

Browse files
edumazetdavem330
authored andcommitted
inet: get rid of last __inet_hash_connect() argument
We now always call __inet_hash_nolisten(), no need to pass it as an argument. Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 77a6a47 commit b4d6444

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

include/net/inet_hashtables.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -409,9 +409,7 @@ int __inet_hash_connect(struct inet_timewait_death_row *death_row,
409409
struct sock *sk, u32 port_offset,
410410
int (*check_established)(struct inet_timewait_death_row *,
411411
struct sock *, __u16,
412-
struct inet_timewait_sock **),
413-
int (*hash)(struct sock *sk,
414-
struct inet_timewait_sock *twp));
412+
struct inet_timewait_sock **));
415413

416414
int inet_hash_connect(struct inet_timewait_death_row *death_row,
417415
struct sock *sk);

net/ipv4/inet_hashtables.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,7 @@ EXPORT_SYMBOL_GPL(inet_unhash);
488488
int __inet_hash_connect(struct inet_timewait_death_row *death_row,
489489
struct sock *sk, u32 port_offset,
490490
int (*check_established)(struct inet_timewait_death_row *,
491-
struct sock *, __u16, struct inet_timewait_sock **),
492-
int (*hash)(struct sock *sk, struct inet_timewait_sock *twp))
491+
struct sock *, __u16, struct inet_timewait_sock **))
493492
{
494493
struct inet_hashinfo *hinfo = death_row->hashinfo;
495494
const unsigned short snum = inet_sk(sk)->inet_num;
@@ -559,7 +558,7 @@ int __inet_hash_connect(struct inet_timewait_death_row *death_row,
559558
inet_bind_hash(sk, tb, port);
560559
if (sk_unhashed(sk)) {
561560
inet_sk(sk)->inet_sport = htons(port);
562-
twrefcnt += hash(sk, tw);
561+
twrefcnt += __inet_hash_nolisten(sk, tw);
563562
}
564563
if (tw)
565564
twrefcnt += inet_twsk_bind_unhash(tw, hinfo);
@@ -581,7 +580,7 @@ int __inet_hash_connect(struct inet_timewait_death_row *death_row,
581580
tb = inet_csk(sk)->icsk_bind_hash;
582581
spin_lock_bh(&head->lock);
583582
if (sk_head(&tb->owners) == sk && !sk->sk_bind_node.next) {
584-
hash(sk, NULL);
583+
__inet_hash_nolisten(sk, NULL);
585584
spin_unlock_bh(&head->lock);
586585
return 0;
587586
} else {
@@ -601,7 +600,7 @@ int inet_hash_connect(struct inet_timewait_death_row *death_row,
601600
struct sock *sk)
602601
{
603602
return __inet_hash_connect(death_row, sk, inet_sk_port_offset(sk),
604-
__inet_check_established, __inet_hash_nolisten);
603+
__inet_check_established);
605604
}
606605
EXPORT_SYMBOL_GPL(inet_hash_connect);
607606

net/ipv6/inet6_hashtables.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,6 @@ int inet6_hash_connect(struct inet_timewait_death_row *death_row,
270270
struct sock *sk)
271271
{
272272
return __inet_hash_connect(death_row, sk, inet6_sk_port_offset(sk),
273-
__inet6_check_established, __inet_hash_nolisten);
273+
__inet6_check_established);
274274
}
275275
EXPORT_SYMBOL_GPL(inet6_hash_connect);

0 commit comments

Comments
 (0)