X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=mm%2Fmemory_hotplug.c;h=1fe76d963ac21a2d09d5d8cb8e21e687163202f1;hb=b4cf1b72eec0e197257a5b07dc9ec53552cdd123;hp=431a64f021c0ed7c5dc9a40c63096f99ba16d464;hpb=23fd07750a789a66fe88cf173d52a18f1a387da4;p=powerpc.git diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 431a64f021..1fe76d963a 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -42,7 +42,6 @@ extern int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, int nr_pages); static int __add_section(struct zone *zone, unsigned long phys_start_pfn) { - struct pglist_data *pgdat = zone->zone_pgdat; int nr_pages = PAGES_PER_SECTION; int ret; @@ -104,7 +103,7 @@ static void grow_pgdat_span(struct pglist_data *pgdat, pgdat->node_start_pfn = start_pfn; if (end_pfn > old_pgdat_end_pfn) - pgdat->node_spanned_pages = end_pfn - pgdat->node_spanned_pages; + pgdat->node_spanned_pages = end_pfn - pgdat->node_start_pfn; } int online_pages(unsigned long pfn, unsigned long nr_pages) @@ -131,6 +130,7 @@ int online_pages(unsigned long pfn, unsigned long nr_pages) onlined_pages++; } zone->present_pages += onlined_pages; + zone->zone_pgdat->node_present_pages += onlined_pages; setup_per_zone_pages_min();