Merge tag 'iwlwifi-next-for-kalle-2014-12-30' of https://git.kernel.org/pub/scm/linux...
[cascardo/linux.git] / fs / drop_caches.c
index 1de7294..2bc2c87 100644 (file)
@@ -40,13 +40,14 @@ static void drop_pagecache_sb(struct super_block *sb, void *unused)
 static void drop_slab(void)
 {
        int nr_objects;
-       struct shrink_control shrink = {
-               .gfp_mask = GFP_KERNEL,
-       };
 
-       nodes_setall(shrink.nodes_to_scan);
        do {
-               nr_objects = shrink_slab(&shrink, 1000, 1000);
+               int nid;
+
+               nr_objects = 0;
+               for_each_online_node(nid)
+                       nr_objects += shrink_node_slabs(GFP_KERNEL, nid,
+                                                       1000, 1000);
        } while (nr_objects > 10);
 }