aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mm/page_alloc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index ca978992c898..7f580779abdb 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1460,25 +1460,25 @@ void show_free_areas(void)
1460 * Add all populated zones of a node to the zonelist. 1460 * Add all populated zones of a node to the zonelist.
1461 */ 1461 */
1462static int __init build_zonelists_node(pg_data_t *pgdat, 1462static int __init build_zonelists_node(pg_data_t *pgdat,
1463 struct zonelist *zonelist, int j, int k) 1463 struct zonelist *zonelist, int nr_zones, int zone_type)
1464{ 1464{
1465 struct zone *zone; 1465 struct zone *zone;
1466 1466
1467 BUG_ON(k > ZONE_HIGHMEM); 1467 BUG_ON(zone_type > ZONE_HIGHMEM);
1468 1468
1469 do { 1469 do {
1470 zone = pgdat->node_zones + k; 1470 zone = pgdat->node_zones + zone_type;
1471 if (populated_zone(zone)) { 1471 if (populated_zone(zone)) {
1472#ifndef CONFIG_HIGHMEM 1472#ifndef CONFIG_HIGHMEM
1473 BUG_ON(k > ZONE_NORMAL); 1473 BUG_ON(zone_type > ZONE_NORMAL);
1474#endif 1474#endif
1475 zonelist->zones[j++] = zone; 1475 zonelist->zones[nr_zones++] = zone;
1476 check_highest_zone(k); 1476 check_highest_zone(zone_type);
1477 } 1477 }
1478 k--; 1478 zone_type--;
1479 1479
1480 } while (k >= 0); 1480 } while (zone_type >= 0);
1481 return j; 1481 return nr_zones;
1482} 1482}
1483 1483
1484static inline int highest_zone(int zone_bits) 1484static inline int highest_zone(int zone_bits)