[PATCH] page migration cleanup: extract try_to_unmap from migration functions
authorChristoph Lameter <clameter@sgi.com>
Fri, 23 Jun 2006 09:03:32 +0000 (02:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Jun 2006 14:42:50 +0000 (07:42 -0700)
commitc3fcf8a5daacf350f0632e1379414c01f34eeea3
treeec7a4cd5d7a2b60ec4539479bb5b24c46b5cf72f
parent5b5c7120e2154239837fad5e3c7b7b781092b19c
[PATCH] page migration cleanup: extract try_to_unmap from migration functions

Extract try_to_unmap and rename remove_references -> move_mapping

try_to_unmap() may significantly change the page state by for example setting
the dirty bit.  It is therefore best to unmap in migrate_pages() before
calling any migration functions.

migrate_page_remove_references() will then only move the new page in place of
the old page in the mapping.  Rename the function to
migrate_page_move_mapping().

This allows us to get rid of the special unmapping for the fallback path.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/migrate.c