Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux
[firefly-linux-kernel-4.4.55.git] / fs / drop_caches.c
index 1de7294aad208db5fb5b749ee7fc4c5a7d048f4e..2bc2c87f35e7a251628da1390f288b0cf8f2e721 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);
 }