diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2018-07-16 13:26:13 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-25 10:18:16 +0200 |
commit | b67a684222441668cf326427d02c34a8dfedb6be (patch) | |
tree | 42bc153dc8d7d459e6c8e8e3e0da2180b4dc48a4 /net/ipv4/fib_frontend.c | |
parent | 2be7797acd1bb9ec30920b2aac29e474184ede4e (diff) |
lib/rhashtable: consider param->min_size when setting initial table size
[ Upstream commit 107d01f5ba10f4162c38109496607eb197059064 ]
rhashtable_init() currently does not take into account the user-passed
min_size parameter unless param->nelem_hint is set as well. As such,
the default size (number of buckets) will always be HASH_DEFAULT_SIZE
even if the smallest allowed size is larger than that. Remediate this
by unconditionally calling into rounded_hashtable_size() and handling
things accordingly.
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/ipv4/fib_frontend.c')
0 files changed, 0 insertions, 0 deletions