Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4d6444e authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

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: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 77a6a471
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -409,9 +409,7 @@ int __inet_hash_connect(struct inet_timewait_death_row *death_row,
			struct sock *sk, u32 port_offset,
			struct sock *sk, u32 port_offset,
			int (*check_established)(struct inet_timewait_death_row *,
			int (*check_established)(struct inet_timewait_death_row *,
						 struct sock *, __u16,
						 struct sock *, __u16,
						 struct inet_timewait_sock **),
						 struct inet_timewait_sock **));
			int (*hash)(struct sock *sk,
				    struct inet_timewait_sock *twp));


int inet_hash_connect(struct inet_timewait_death_row *death_row,
int inet_hash_connect(struct inet_timewait_death_row *death_row,
		      struct sock *sk);
		      struct sock *sk);
+4 −5
Original line number Original line Diff line number Diff line
@@ -488,8 +488,7 @@ EXPORT_SYMBOL_GPL(inet_unhash);
int __inet_hash_connect(struct inet_timewait_death_row *death_row,
int __inet_hash_connect(struct inet_timewait_death_row *death_row,
		struct sock *sk, u32 port_offset,
		struct sock *sk, u32 port_offset,
		int (*check_established)(struct inet_timewait_death_row *,
		int (*check_established)(struct inet_timewait_death_row *,
			struct sock *, __u16, struct inet_timewait_sock **),
			struct sock *, __u16, struct inet_timewait_sock **))
		int (*hash)(struct sock *sk, struct inet_timewait_sock *twp))
{
{
	struct inet_hashinfo *hinfo = death_row->hashinfo;
	struct inet_hashinfo *hinfo = death_row->hashinfo;
	const unsigned short snum = inet_sk(sk)->inet_num;
	const unsigned short snum = inet_sk(sk)->inet_num;
@@ -559,7 +558,7 @@ ok:
		inet_bind_hash(sk, tb, port);
		inet_bind_hash(sk, tb, port);
		if (sk_unhashed(sk)) {
		if (sk_unhashed(sk)) {
			inet_sk(sk)->inet_sport = htons(port);
			inet_sk(sk)->inet_sport = htons(port);
			twrefcnt += hash(sk, tw);
			twrefcnt += __inet_hash_nolisten(sk, tw);
		}
		}
		if (tw)
		if (tw)
			twrefcnt += inet_twsk_bind_unhash(tw, hinfo);
			twrefcnt += inet_twsk_bind_unhash(tw, hinfo);
@@ -581,7 +580,7 @@ ok:
	tb  = inet_csk(sk)->icsk_bind_hash;
	tb  = inet_csk(sk)->icsk_bind_hash;
	spin_lock_bh(&head->lock);
	spin_lock_bh(&head->lock);
	if (sk_head(&tb->owners) == sk && !sk->sk_bind_node.next) {
	if (sk_head(&tb->owners) == sk && !sk->sk_bind_node.next) {
		hash(sk, NULL);
		__inet_hash_nolisten(sk, NULL);
		spin_unlock_bh(&head->lock);
		spin_unlock_bh(&head->lock);
		return 0;
		return 0;
	} else {
	} else {
@@ -601,7 +600,7 @@ int inet_hash_connect(struct inet_timewait_death_row *death_row,
		      struct sock *sk)
		      struct sock *sk)
{
{
	return __inet_hash_connect(death_row, sk, inet_sk_port_offset(sk),
	return __inet_hash_connect(death_row, sk, inet_sk_port_offset(sk),
			__inet_check_established, __inet_hash_nolisten);
				   __inet_check_established);
}
}
EXPORT_SYMBOL_GPL(inet_hash_connect);
EXPORT_SYMBOL_GPL(inet_hash_connect);


+1 −1
Original line number Original line Diff line number Diff line
@@ -270,6 +270,6 @@ int inet6_hash_connect(struct inet_timewait_death_row *death_row,
		       struct sock *sk)
		       struct sock *sk)
{
{
	return __inet_hash_connect(death_row, sk, inet6_sk_port_offset(sk),
	return __inet_hash_connect(death_row, sk, inet6_sk_port_offset(sk),
			__inet6_check_established, __inet_hash_nolisten);
				   __inet6_check_established);
}
}
EXPORT_SYMBOL_GPL(inet6_hash_connect);
EXPORT_SYMBOL_GPL(inet6_hash_connect);