diff options
-rw-r--r-- | mm/page_alloc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 512e3f4d4963..ca978992c898 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -1465,15 +1465,19 @@ static int __init build_zonelists_node(pg_data_t *pgdat, | |||
1465 | struct zone *zone; | 1465 | struct zone *zone; |
1466 | 1466 | ||
1467 | BUG_ON(k > ZONE_HIGHMEM); | 1467 | BUG_ON(k > ZONE_HIGHMEM); |
1468 | for (zone = pgdat->node_zones + k; zone >= pgdat->node_zones; zone--) { | 1468 | |
1469 | do { | ||
1470 | zone = pgdat->node_zones + k; | ||
1469 | if (populated_zone(zone)) { | 1471 | if (populated_zone(zone)) { |
1470 | #ifndef CONFIG_HIGHMEM | 1472 | #ifndef CONFIG_HIGHMEM |
1471 | BUG_ON(zone - pgdat->node_zones > ZONE_NORMAL); | 1473 | BUG_ON(k > ZONE_NORMAL); |
1472 | #endif | 1474 | #endif |
1473 | zonelist->zones[j++] = zone; | 1475 | zonelist->zones[j++] = zone; |
1474 | check_highest_zone(k); | 1476 | check_highest_zone(k); |
1475 | } | 1477 | } |
1476 | } | 1478 | k--; |
1479 | |||
1480 | } while (k >= 0); | ||
1477 | return j; | 1481 | return j; |
1478 | } | 1482 | } |
1479 | 1483 | ||