aboutsummaryrefslogtreecommitdiffstats
path: root/net/dccp/proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dccp/proto.c')
-rw-r--r--net/dccp/proto.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/dccp/proto.c b/net/dccp/proto.c
index 63b3fa20e14b..cf28c53a389a 100644
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -478,7 +478,7 @@ static int do_dccp_setsockopt(struct sock *sk, int level, int optname,
478 err = -EINVAL; 478 err = -EINVAL;
479 else 479 else
480 err = dccp_setsockopt_change(sk, DCCPO_CHANGE_L, 480 err = dccp_setsockopt_change(sk, DCCPO_CHANGE_L,
481 (struct dccp_so_feat __user *) 481 (struct dccp_so_feat __user *)
482 optval); 482 optval);
483 break; 483 break;
484 case DCCP_SOCKOPT_CHANGE_R: 484 case DCCP_SOCKOPT_CHANGE_R:
@@ -1024,7 +1024,6 @@ static int __init dccp_init(void)
1024 do { 1024 do {
1025 dccp_hashinfo.ehash_size = (1UL << ehash_order) * PAGE_SIZE / 1025 dccp_hashinfo.ehash_size = (1UL << ehash_order) * PAGE_SIZE /
1026 sizeof(struct inet_ehash_bucket); 1026 sizeof(struct inet_ehash_bucket);
1027 dccp_hashinfo.ehash_size >>= 1;
1028 while (dccp_hashinfo.ehash_size & 1027 while (dccp_hashinfo.ehash_size &
1029 (dccp_hashinfo.ehash_size - 1)) 1028 (dccp_hashinfo.ehash_size - 1))
1030 dccp_hashinfo.ehash_size--; 1029 dccp_hashinfo.ehash_size--;
@@ -1037,9 +1036,10 @@ static int __init dccp_init(void)
1037 goto out_free_bind_bucket_cachep; 1036 goto out_free_bind_bucket_cachep;
1038 } 1037 }
1039 1038
1040 for (i = 0; i < (dccp_hashinfo.ehash_size << 1); i++) { 1039 for (i = 0; i < dccp_hashinfo.ehash_size; i++) {
1041 rwlock_init(&dccp_hashinfo.ehash[i].lock); 1040 rwlock_init(&dccp_hashinfo.ehash[i].lock);
1042 INIT_HLIST_HEAD(&dccp_hashinfo.ehash[i].chain); 1041 INIT_HLIST_HEAD(&dccp_hashinfo.ehash[i].chain);
1042 INIT_HLIST_HEAD(&dccp_hashinfo.ehash[i].twchain);
1043 } 1043 }
1044 1044
1045 bhash_order = ehash_order; 1045 bhash_order = ehash_order;