]> git.ipfire.org Git - people/ms/linux.git/commit
migrate: don't account swapcache as shmem
authorAndrea Arcangeli <aarcange@redhat.com>
Thu, 16 Jun 2011 19:56:19 +0000 (12:56 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 13 Jul 2011 03:29:23 +0000 (05:29 +0200)
commitf55a989b78ac67a318f256d64d7fdb64fac44a65
tree6328a2d066fc9bc3352d4b57d933c198872ca701
parent4553fbdf55fab298a213812d21988670a4bd0edd
migrate: don't account swapcache as shmem

commit 99a15e21d96f6857dafab1e5167e5e8183215c9c upstream.

swapcache will reach the below code path in migrate_page_move_mapping,
and swapcache is accounted as NR_FILE_PAGES but it's not accounted as
NR_SHMEM.

Hugh pointed out we must use PageSwapCache instead of comparing
mapping to &swapper_space, to avoid build failure with CONFIG_SWAP=n.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
mm/migrate.c