aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/rhashtable.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rhashtable.h')
-rw-r--r--include/linux/rhashtable.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h
index e23d242d1230..dbcbcc59aa92 100644
--- a/include/linux/rhashtable.h
+++ b/include/linux/rhashtable.h
@@ -282,7 +282,8 @@ static inline bool rht_shrink_below_30(const struct rhashtable *ht,
282static inline bool rht_grow_above_100(const struct rhashtable *ht, 282static inline bool rht_grow_above_100(const struct rhashtable *ht,
283 const struct bucket_table *tbl) 283 const struct bucket_table *tbl)
284{ 284{
285 return atomic_read(&ht->nelems) > tbl->size; 285 return atomic_read(&ht->nelems) > tbl->size &&
286 (!ht->p.max_size || tbl->size < ht->p.max_size);
286} 287}
287 288
288/* The bucket lock is selected based on the hash and protects mutations 289/* The bucket lock is selected based on the hash and protects mutations