diff options
Diffstat (limited to 'net/ipv4/inet_timewait_sock.c')
-rw-r--r-- | net/ipv4/inet_timewait_sock.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index ceb577c74237..5cba59b869fe 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c | |||
@@ -56,6 +56,7 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk, | |||
56 | struct inet_hashinfo *hashinfo) | 56 | struct inet_hashinfo *hashinfo) |
57 | { | 57 | { |
58 | const struct inet_sock *inet = inet_sk(sk); | 58 | const struct inet_sock *inet = inet_sk(sk); |
59 | const struct inet_connection_sock *icsk = inet_csk(sk); | ||
59 | struct inet_ehash_bucket *ehead = &hashinfo->ehash[sk->sk_hashent]; | 60 | struct inet_ehash_bucket *ehead = &hashinfo->ehash[sk->sk_hashent]; |
60 | struct inet_bind_hashbucket *bhead; | 61 | struct inet_bind_hashbucket *bhead; |
61 | /* Step 1: Put TW into bind hash. Original socket stays there too. | 62 | /* Step 1: Put TW into bind hash. Original socket stays there too. |
@@ -64,8 +65,8 @@ void __inet_twsk_hashdance(struct inet_timewait_sock *tw, struct sock *sk, | |||
64 | */ | 65 | */ |
65 | bhead = &hashinfo->bhash[inet_bhashfn(inet->num, hashinfo->bhash_size)]; | 66 | bhead = &hashinfo->bhash[inet_bhashfn(inet->num, hashinfo->bhash_size)]; |
66 | spin_lock(&bhead->lock); | 67 | spin_lock(&bhead->lock); |
67 | tw->tw_tb = inet->bind_hash; | 68 | tw->tw_tb = icsk->icsk_bind_hash; |
68 | BUG_TRAP(inet->bind_hash); | 69 | BUG_TRAP(icsk->icsk_bind_hash); |
69 | inet_twsk_add_bind_node(tw, &tw->tw_tb->owners); | 70 | inet_twsk_add_bind_node(tw, &tw->tw_tb->owners); |
70 | spin_unlock(&bhead->lock); | 71 | spin_unlock(&bhead->lock); |
71 | 72 | ||