From 114b2abd2dfab114bdc89b2a9b36822a25e8f570 Mon Sep 17 00:00:00 2001 From: Yasunori Goto Date: Tue, 30 May 2006 21:25:42 -0700 Subject: [PATCH] --- yaml --- r: 27041 b: refs/heads/master c: 25a6df952542ad9f284421b6ffe28f3eb3df1305 h: refs/heads/master i: 27039: 73aa7e05b9aa9e27fb2640dbf91364a76a2daf18 v: v3 --- [refs] | 2 +- trunk/mm/memory_hotplug.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 379f9982964b..6aaea2962f72 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 308af9290ad1844c1b4e93ff4919f8009efbe018 +refs/heads/master: 25a6df952542ad9f284421b6ffe28f3eb3df1305 diff --git a/trunk/mm/memory_hotplug.c b/trunk/mm/memory_hotplug.c index 1ae2b2cc3a54..70df5c0d957e 100644 --- a/trunk/mm/memory_hotplug.c +++ b/trunk/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)