aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/inet_timewait_sock.c
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2009-10-08 20:16:19 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-13 06:44:02 -0400
commitf373b53b5fe67aa4a6f28f921a529cc90f88e79b (patch)
treeb2cae9152aed2e30b7a39c114678b9355ab5c14f /net/ipv4/inet_timewait_sock.c
parentc3faca053d0a9c877597935b434150b422dbc6fb (diff)
tcp: replace ehash_size by ehash_mask
Storing the mask (size - 1) instead of the size allows fast path to be a bit faster. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/inet_timewait_sock.c')
-rw-r--r--net/ipv4/inet_timewait_sock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c
index 13f0781f35cd..2fe571155b22 100644
--- a/net/ipv4/inet_timewait_sock.c
+++ b/net/ipv4/inet_timewait_sock.c
@@ -430,7 +430,7 @@ void inet_twsk_purge(struct net *net, struct inet_hashinfo *hashinfo,
430 int h; 430 int h;
431 431
432 local_bh_disable(); 432 local_bh_disable();
433 for (h = 0; h < (hashinfo->ehash_size); h++) { 433 for (h = 0; h <= hashinfo->ehash_mask; h++) {
434 struct inet_ehash_bucket *head = 434 struct inet_ehash_bucket *head =
435 inet_ehash_bucket(hashinfo, h); 435 inet_ehash_bucket(hashinfo, h);
436 spinlock_t *lock = inet_ehash_lockp(hashinfo, h); 436 spinlock_t *lock = inet_ehash_lockp(hashinfo, h);