Fix calculation in move_freepages_block for counting pages
authorMel Gorman <mel@csn.ul.ie>
Tue, 16 Oct 2007 08:26:00 +0000 (01:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 16 Oct 2007 16:43:00 +0000 (09:43 -0700)
commitd100313fd615cc30374ff92e0b3facb053838330
treef0bcd5e3b07bee40a65182c63b54baceca366849
parent64c5e135bf5a2a7f0ededb3435a31adbe0202f0c
Fix calculation in move_freepages_block for counting pages

move_freepages_block() returns the number of blocks moved.  This value is used
to determine if a block of pages should be stolen for the exclusive use of a
migrate type or not.  However, the value returned is being used correctly.
This patch fixes the calculation to return the number of base pages that have
been moved.

This should be considered a fix to the patch
move-free-pages-between-lists-on-steal.patch

Credit to Andy Whitcroft for spotting the problem.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Acked-by: Andy Whitcroft <apw@shadowen.org>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c