]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[PATCH] Direct Migration V9: PageSwapCache checks
authorChristoph Lameter <clameter@sgi.com>
Wed, 1 Feb 2006 11:05:36 +0000 (03:05 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 1 Feb 2006 16:53:16 +0000 (08:53 -0800)
commitb16664e44c54525be89dc07ad15a13b4eeec5634
tree1844d193009c1e55e3c26256feb14bc622ec9af3
parent2a16e3f4b0c408b9e50297d2ec27e295d490267a
[PATCH] Direct Migration V9: PageSwapCache checks

Check for PageSwapCache after looking up and locking a swap page.

The page migration code may change a swap pte to point to a different page
under lock_page().

If that happens then the vm must retry the lookup operation in the swap space
to find the correct page number.  There are a couple of locations in the VM
where a lock_page() is done on a swap page.  In these locations we need to
check afterwards if the page was migrated.  If the page was migrated then the
old page that was looked up before was freed and no longer has the
PageSwapCache bit set.

Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp>
Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
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/memory.c
mm/shmem.c
mm/swapfile.c