]> git.baikalelectronics.ru Git - kernel.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)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 16 Jun 2011 22:01:24 +0000 (15:01 -0700)
commit61f3c36ef4e4d56e77565bce2cf2c4baada254fe
treeeb6224c0bf11fc243de298c3fa665e418f849d16
parent96d03958f13195af6de31c6339e0947602139b7c
migrate: don't account swapcache as shmem

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>
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/migrate.c