mm: vmscan: correct check for kswapd sleeping in sleeping_prematurely
[linux-flexiantxendom0-natty.git] / mm / vmscan.c
index a74bf72..a578535 100644 (file)
@@ -2261,7 +2261,7 @@ static bool sleeping_prematurely(pg_data_t *pgdat, int order, long remaining,
                return true;
 
        /* Check the watermark levels */
-       for (i = 0; i < pgdat->nr_zones; i++) {
+       for (i = 0; i <= classzone_idx; i++) {
                struct zone *zone = pgdat->node_zones + i;
 
                if (!populated_zone(zone))