projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
mm/page_alloc.c: fix calculation of pgdat->nr_zones
[GitHub/MotorolaMobilityLLC/kernel-slsi.git]
/
mm
/
page_alloc.c
diff --git
a/mm/page_alloc.c
b/mm/page_alloc.c
index 6be91a1a00d9f7cb738b6004745e4a447124bbf9..a2f365f4043365cea2061a99a4805df7b211e658 100644
(file)
--- a/
mm/page_alloc.c
+++ b/
mm/page_alloc.c
@@
-5544,8
+5544,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;