diff options
Diffstat (limited to 'net/ipv4/tcp_minisocks.c')
-rw-r--r-- | net/ipv4/tcp_minisocks.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 7c46a553c4af..1df6cd46066b 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c | |||
@@ -60,9 +60,9 @@ int tcp_tw_count; | |||
60 | /* Must be called with locally disabled BHs. */ | 60 | /* Must be called with locally disabled BHs. */ |
61 | static void tcp_timewait_kill(struct tcp_tw_bucket *tw) | 61 | static void tcp_timewait_kill(struct tcp_tw_bucket *tw) |
62 | { | 62 | { |
63 | struct tcp_ehash_bucket *ehead; | 63 | struct inet_ehash_bucket *ehead; |
64 | struct tcp_bind_hashbucket *bhead; | 64 | struct inet_bind_hashbucket *bhead; |
65 | struct tcp_bind_bucket *tb; | 65 | struct inet_bind_bucket *tb; |
66 | 66 | ||
67 | /* Unlink from established hashes. */ | 67 | /* Unlink from established hashes. */ |
68 | ehead = &tcp_ehash[tw->tw_hashent]; | 68 | ehead = &tcp_ehash[tw->tw_hashent]; |
@@ -76,12 +76,12 @@ static void tcp_timewait_kill(struct tcp_tw_bucket *tw) | |||
76 | write_unlock(&ehead->lock); | 76 | write_unlock(&ehead->lock); |
77 | 77 | ||
78 | /* Disassociate with bind bucket. */ | 78 | /* Disassociate with bind bucket. */ |
79 | bhead = &tcp_bhash[tcp_bhashfn(tw->tw_num)]; | 79 | bhead = &tcp_bhash[inet_bhashfn(tw->tw_num, tcp_bhash_size)]; |
80 | spin_lock(&bhead->lock); | 80 | spin_lock(&bhead->lock); |
81 | tb = tw->tw_tb; | 81 | tb = tw->tw_tb; |
82 | __hlist_del(&tw->tw_bind_node); | 82 | __hlist_del(&tw->tw_bind_node); |
83 | tw->tw_tb = NULL; | 83 | tw->tw_tb = NULL; |
84 | tcp_bucket_destroy(tb); | 84 | inet_bind_bucket_destroy(tcp_bucket_cachep, tb); |
85 | spin_unlock(&bhead->lock); | 85 | spin_unlock(&bhead->lock); |
86 | 86 | ||
87 | #ifdef SOCK_REFCNT_DEBUG | 87 | #ifdef SOCK_REFCNT_DEBUG |
@@ -296,14 +296,14 @@ kill: | |||
296 | */ | 296 | */ |
297 | static void __tcp_tw_hashdance(struct sock *sk, struct tcp_tw_bucket *tw) | 297 | static void __tcp_tw_hashdance(struct sock *sk, struct tcp_tw_bucket *tw) |
298 | { | 298 | { |
299 | struct tcp_ehash_bucket *ehead = &tcp_ehash[sk->sk_hashent]; | 299 | struct inet_ehash_bucket *ehead = &tcp_ehash[sk->sk_hashent]; |
300 | struct tcp_bind_hashbucket *bhead; | 300 | struct inet_bind_hashbucket *bhead; |
301 | 301 | ||
302 | /* Step 1: Put TW into bind hash. Original socket stays there too. | 302 | /* Step 1: Put TW into bind hash. Original socket stays there too. |
303 | Note, that any socket with inet_sk(sk)->num != 0 MUST be bound in | 303 | Note, that any socket with inet_sk(sk)->num != 0 MUST be bound in |
304 | binding cache, even if it is closed. | 304 | binding cache, even if it is closed. |
305 | */ | 305 | */ |
306 | bhead = &tcp_bhash[tcp_bhashfn(inet_sk(sk)->num)]; | 306 | bhead = &tcp_bhash[inet_bhashfn(inet_sk(sk)->num, tcp_bhash_size)]; |
307 | spin_lock(&bhead->lock); | 307 | spin_lock(&bhead->lock); |
308 | tw->tw_tb = tcp_sk(sk)->bind_hash; | 308 | tw->tw_tb = tcp_sk(sk)->bind_hash; |
309 | BUG_TRAP(tcp_sk(sk)->bind_hash); | 309 | BUG_TRAP(tcp_sk(sk)->bind_hash); |