Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rhashtable: Do not lower max_elems when max_size is zero
The commit 6d684e5 ("rhashtable: Cap total number of entries to 2^31") breaks rhashtable users that do not set max_size. This is because when max_size is zero max_elems is also incorrectly set to zero instead of 2^31. This patch fixes it by only lowering max_elems when max_size is not zero. Fixes: 6d684e5 ("rhashtable: Cap total number of entries to 2^31") Reported-by: Florian Fainelli <[email protected]> Reported-by: kernel test robot <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: David S. Miller <[email protected]>
- Loading branch information