Skip to content

Commit

Permalink
[PATCH] Fix calculation of grow_pgdat_span() in mm/memory_hotplug.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yasunori Goto authored and Linus Torvalds committed Dec 14, 2005
1 parent 664d22a commit 118c71b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/memory_hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 118c71b

Please sign in to comment.