[PATCH] Fix calculation of grow_pgdat_span() in mm/memory_hotplug.c
authorYasunori Goto <y-goto@jp.fujitsu.com>
Wed, 14 Dec 2005 01:03:37 +0000 (17:03 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 14 Dec 2005 05:18:16 +0000 (21:18 -0800)
The calculation for node_spanned_pages at grow_pgdat_span() is clearly
wrong.  This is patch for it.

(Please see grow_zone_span() to compare. It is correct.)

Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com>
Acked-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/memory_hotplug.c

index 431a64f021c0ed7c5dc9a40c63096f99ba16d464..f6d4af8af8a8f5a491f837d9bb9c108313ecb7f0 100644 (file)
@@ -104,7 +104,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)