diff options
| author | John W. Linville <linville@tuxdriver.com> | 2006-06-05 14:42:27 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2006-06-05 14:42:27 -0400 |
| commit | dea58b80f2625d3712645fb6ff0af45866cedaae (patch) | |
| tree | b9c0d4f7d4fcd90e438b5cc5d05471e52615a62d /mm/memory_hotplug.c | |
| parent | b1141f6d5dead296adcabd4a1e8ea2b994e287cb (diff) | |
| parent | 672c6108a51bf559d19595d9f8193dfd81f0f752 (diff) | |
Merge branch 'from-linus' into upstream
Diffstat (limited to 'mm/memory_hotplug.c')
| -rw-r--r-- | mm/memory_hotplug.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 1ae2b2cc3a54..70df5c0d957e 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -91,8 +91,8 @@ static void grow_zone_span(struct zone *zone, if (start_pfn < zone->zone_start_pfn) zone->zone_start_pfn = start_pfn; - if (end_pfn > old_zone_end_pfn) - zone->spanned_pages = end_pfn - zone->zone_start_pfn; + zone->spanned_pages = max(old_zone_end_pfn, end_pfn) - + zone->zone_start_pfn; zone_span_writeunlock(zone); } @@ -106,8 +106,8 @@ static void grow_pgdat_span(struct pglist_data *pgdat, if (start_pfn < pgdat->node_start_pfn) pgdat->node_start_pfn = start_pfn; - if (end_pfn > old_pgdat_end_pfn) - pgdat->node_spanned_pages = end_pfn - pgdat->node_start_pfn; + pgdat->node_spanned_pages = max(old_pgdat_end_pfn, end_pfn) - + pgdat->node_start_pfn; } int online_pages(unsigned long pfn, unsigned long nr_pages) |
