tcp: replace ehash_size by ehash_mask
[linux-2.6.git] / net / ipv4 / inet_diag.c
index a706a47f4dbb75aa35e7423781e38491032242b0..cb73fdefba91e14820a566fe0e599a05e6956de3 100644 (file)
@@ -774,7 +774,7 @@ skip_listen_ht:
        if (!(r->idiag_states & ~(TCPF_LISTEN | TCPF_SYN_RECV)))
                goto unlock;
 
-       for (i = s_i; i < hashinfo->ehash_size; i++) {
+       for (i = s_i; i <= hashinfo->ehash_mask; i++) {
                struct inet_ehash_bucket *head = &hashinfo->ehash[i];
                spinlock_t *lock = inet_ehash_lockp(hashinfo, i);
                struct sock *sk;