aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2015-03-18 17:05:37 -0400
committerDavid S. Miller <davem@davemloft.net>2015-03-18 22:00:35 -0400
commitb4d6444ea3b50bf368639432657bcf2b4e5e1062 (patch)
tree25805c8b55c8f18323ef85dcfc460a7016f6f76c
parent77a6a471bc18763cb2e80a8cc92f4c04eae37d32 (diff)
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 <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/net/inet_hashtables.h4
-rw-r--r--net/ipv4/inet_hashtables.c9
-rw-r--r--net/ipv6/inet6_hashtables.c2
3 files changed, 6 insertions, 9 deletions
diff --git a/include/net/inet_hashtables.h b/include/net/inet_hashtables.h
index eee6c3399990..73fe0f9525d9 100644
--- a/include/net/inet_hashtables.h
+++ b/include/net/inet_hashtables.h
@@ -409,9 +409,7 @@ int __inet_hash_connect(struct inet_timewait_death_row *death_row,
409 struct sock *sk, u32 port_offset, 409 struct sock *sk, u32 port_offset,
410 int (*check_established)(struct inet_timewait_death_row *, 410 int (*check_established)(struct inet_timewait_death_row *,
411 struct sock *, __u16, 411 struct sock *, __u16,
412 struct inet_timewait_sock **), 412 struct inet_timewait_sock **));
413 int (*hash)(struct sock *sk,
414 struct inet_timewait_sock *twp));
415 413
416int inet_hash_connect(struct inet_timewait_death_row *death_row, 414int inet_hash_connect(struct inet_timewait_death_row *death_row,
417 struct sock *sk); 415 struct sock *sk);
diff --git a/net/ipv4/inet_hashtables.c b/net/ipv4/inet_hashtables.c
index 82753bd57e79..0fb841b9d834 100644
--- a/net/ipv4/inet_hashtables.c
+++ b/net/ipv4/inet_hashtables.c
@@ -488,8 +488,7 @@ EXPORT_SYMBOL_GPL(inet_unhash);
488int __inet_hash_connect(struct inet_timewait_death_row *death_row, 488int __inet_hash_connect(struct inet_timewait_death_row *death_row,
489 struct sock *sk, u32 port_offset, 489 struct sock *sk, u32 port_offset,
490 int (*check_established)(struct inet_timewait_death_row *, 490 int (*check_established)(struct inet_timewait_death_row *,
491 struct sock *, __u16, struct inet_timewait_sock **), 491 struct sock *, __u16, struct inet_timewait_sock **))
492 int (*hash)(struct sock *sk, struct inet_timewait_sock *twp))
493{ 492{
494 struct inet_hashinfo *hinfo = death_row->hashinfo; 493 struct inet_hashinfo *hinfo = death_row->hashinfo;
495 const unsigned short snum = inet_sk(sk)->inet_num; 494 const unsigned short snum = inet_sk(sk)->inet_num;
@@ -559,7 +558,7 @@ ok:
559 inet_bind_hash(sk, tb, port); 558 inet_bind_hash(sk, tb, port);
560 if (sk_unhashed(sk)) { 559 if (sk_unhashed(sk)) {
561 inet_sk(sk)->inet_sport = htons(port); 560 inet_sk(sk)->inet_sport = htons(port);
562 twrefcnt += hash(sk, tw); 561 twrefcnt += __inet_hash_nolisten(sk, tw);
563 } 562 }
564 if (tw) 563 if (tw)
565 twrefcnt += inet_twsk_bind_unhash(tw, hinfo); 564 twrefcnt += inet_twsk_bind_unhash(tw, hinfo);
@@ -581,7 +580,7 @@ ok:
581 tb = inet_csk(sk)->icsk_bind_hash; 580 tb = inet_csk(sk)->icsk_bind_hash;
582 spin_lock_bh(&head->lock); 581 spin_lock_bh(&head->lock);
583 if (sk_head(&tb->owners) == sk && !sk->sk_bind_node.next) { 582 if (sk_head(&tb->owners) == sk && !sk->sk_bind_node.next) {
584 hash(sk, NULL); 583 __inet_hash_nolisten(sk, NULL);
585 spin_unlock_bh(&head->lock); 584 spin_unlock_bh(&head->lock);
586 return 0; 585 return 0;
587 } else { 586 } else {
@@ -601,7 +600,7 @@ int inet_hash_connect(struct inet_timewait_death_row *death_row,
601 struct sock *sk) 600 struct sock *sk)
602{ 601{
603 return __inet_hash_connect(death_row, sk, inet_sk_port_offset(sk), 602 return __inet_hash_connect(death_row, sk, inet_sk_port_offset(sk),
604 __inet_check_established, __inet_hash_nolisten); 603 __inet_check_established);
605} 604}
606EXPORT_SYMBOL_GPL(inet_hash_connect); 605EXPORT_SYMBOL_GPL(inet_hash_connect);
607 606
diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
index b86b429f5f81..033f17816ef4 100644
--- a/net/ipv6/inet6_hashtables.c
+++ b/net/ipv6/inet6_hashtables.c
@@ -270,6 +270,6 @@ int inet6_hash_connect(struct inet_timewait_death_row *death_row,
270 struct sock *sk) 270 struct sock *sk)
271{ 271{
272 return __inet_hash_connect(death_row, sk, inet6_sk_port_offset(sk), 272 return __inet_hash_connect(death_row, sk, inet6_sk_port_offset(sk),
273 __inet6_check_established, __inet_hash_nolisten); 273 __inet6_check_established);
274} 274}
275EXPORT_SYMBOL_GPL(inet6_hash_connect); 275EXPORT_SYMBOL_GPL(inet6_hash_connect);