aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/vmscan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c
index b15dcbb9e174..9578063cd943 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -2109,7 +2109,6 @@ unsigned long shrink_all_memory(unsigned long nr_pages)
2109 struct scan_control sc = { 2109 struct scan_control sc = {
2110 .gfp_mask = GFP_KERNEL, 2110 .gfp_mask = GFP_KERNEL,
2111 .may_unmap = 0, 2111 .may_unmap = 0,
2112 .swap_cluster_max = nr_pages,
2113 .may_writepage = 1, 2112 .may_writepage = 1,
2114 .isolate_pages = isolate_pages_global, 2113 .isolate_pages = isolate_pages_global,
2115 }; 2114 };
@@ -2151,6 +2150,7 @@ unsigned long shrink_all_memory(unsigned long nr_pages)
2151 unsigned long nr_to_scan = nr_pages - sc.nr_reclaimed; 2150 unsigned long nr_to_scan = nr_pages - sc.nr_reclaimed;
2152 2151
2153 sc.nr_scanned = 0; 2152 sc.nr_scanned = 0;
2153 sc.swap_cluster_max = nr_to_scan;
2154 shrink_all_zones(nr_to_scan, prio, pass, &sc); 2154 shrink_all_zones(nr_to_scan, prio, pass, &sc);
2155 if (sc.nr_reclaimed >= nr_pages) 2155 if (sc.nr_reclaimed >= nr_pages)
2156 goto out; 2156 goto out;