]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - mm/page_alloc.c
nvme-core: optionally poll sync commands
[linux.git] / mm / page_alloc.c
index 6847177dc4a1a89ce098c6ab6f4b19e46dab2428..2ec9cc407216565f849b752484e731433fba146c 100644 (file)
@@ -5813,8 +5813,10 @@ void __meminit init_currently_empty_zone(struct zone *zone,
                                        unsigned long size)
 {
        struct pglist_data *pgdat = zone->zone_pgdat;
+       int zone_idx = zone_idx(zone) + 1;
 
-       pgdat->nr_zones = zone_idx(zone) + 1;
+       if (zone_idx > pgdat->nr_zones)
+               pgdat->nr_zones = zone_idx;
 
        zone->zone_start_pfn = zone_start_pfn;