summaryrefslogtreecommitdiff
path: root/lib/rhashtable.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2015-03-24 20:42:19 +0000
committerDavid S. Miller <davem@davemloft.net>2015-03-24 17:48:40 -0400
commitb5e2c150ac914f28a28833b57397bec0b0a2bd5f (patch)
treed22f31d07f001ac2afb5ca7a15de3fee73e74ab6 /lib/rhashtable.c
parentac833bddb591b9c7a0609f440f196375be184044 (diff)
rhashtable: Disable automatic shrinking by default
Introduce a new bool automatic_shrinking to require the user to explicitly opt-in to automatic shrinking of tables. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/rhashtable.c')
-rw-r--r--lib/rhashtable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rhashtable.c b/lib/rhashtable.c
index 50abe4fec4b8..50374d181148 100644
--- a/lib/rhashtable.c
+++ b/lib/rhashtable.c
@@ -367,7 +367,7 @@ static void rht_deferred_worker(struct work_struct *work)
if (rht_grow_above_75(ht, tbl))
rhashtable_expand(ht);
- else if (rht_shrink_below_30(ht, tbl))
+ else if (ht->p.automatic_shrinking && rht_shrink_below_30(ht, tbl))
rhashtable_shrink(ht);
err = rhashtable_rehash_table(ht);