mm,vmscan: fix divide by zero in get_scan_count
[linux-2.6-microblaze.git] / mm / vmscan.c
index 740d03e..74296c2 100644 (file)
@@ -2715,7 +2715,7 @@ out:
                        cgroup_size = max(cgroup_size, protection);
 
                        scan = lruvec_size - lruvec_size * protection /
-                               cgroup_size;
+                               (cgroup_size + 1);
 
                        /*
                         * Minimally target SWAP_CLUSTER_MAX pages to keep