* [PATCH][net-next] rhashtable: ensure that ht->p.min_size is round up to the power of two
@ 2015-03-20 8:13 rongqing.li
2015-03-20 8:49 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: rongqing.li @ 2015-03-20 8:13 UTC (permalink / raw)
To: netdev, tgraf, herbert
From: Li RongQing <roy.qing.li@gmail.com>
ht->p.min_size will be reset to params->min_size, which has been set
to the params->min_size round up of the power of two, should be kept
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Cc: Thomas Graf <tgraf@suug.ch>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
---
lib/rhashtable.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index e75c48d..fda169b 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -946,7 +946,7 @@ int rhashtable_init(struct rhashtable *ht, struct rhashtable_params *params)
if (params->max_size)
ht->p.max_size = rounddown_pow_of_two(params->max_size);
- ht->p.min_size = max(params->min_size, HASH_MIN_SIZE);
+ ht->p.min_size = max(ht->p.min_size, HASH_MIN_SIZE);
if (params->locks_mul)
ht->p.locks_mul = roundup_pow_of_two(params->locks_mul);
--
2.1.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-03-20 8:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-20 8:13 [PATCH][net-next] rhashtable: ensure that ht->p.min_size is round up to the power of two rongqing.li
2015-03-20 8:49 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox