aboutsummaryrefslogtreecommitdiffstats
path: root/fs/drop_caches.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/drop_caches.c')
-rw-r--r--fs/drop_caches.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/fs/drop_caches.c b/fs/drop_caches.c
index 1de7294aad20..2bc2c87f35e7 100644
--- a/fs/drop_caches.c
+++ b/fs/drop_caches.c
@@ -40,13 +40,14 @@ static void drop_pagecache_sb(struct super_block *sb, void *unused)
40static void drop_slab(void) 40static void drop_slab(void)
41{ 41{
42 int nr_objects; 42 int nr_objects;
43 struct shrink_control shrink = {
44 .gfp_mask = GFP_KERNEL,
45 };
46 43
47 nodes_setall(shrink.nodes_to_scan);
48 do { 44 do {
49 nr_objects = shrink_slab(&shrink, 1000, 1000); 45 int nid;
46
47 nr_objects = 0;
48 for_each_online_node(nid)
49 nr_objects += shrink_node_slabs(GFP_KERNEL, nid,
50 1000, 1000);
50 } while (nr_objects > 10); 51 } while (nr_objects > 10);
51} 52}
52 53