Skip to content
Commit a998f712 authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller
Browse files

rhashtable: Round up/down min/max_size to ensure we respect limit



Round up min_size respectively round down max_size to the next power
of two to make sure we always respect the limit specified by the
user. This is required because we compare the table size against the
limit before we expand or shrink.

Also fixes a minor bug where we modified min_size in the params
provided instead of the copy stored in struct rhashtable.

Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Acked-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 91a0f930
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment