]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: madvise: fix MADV_WILLNEED on shmem swapouts
authorJohannes Weiner <hannes@cmpxchg.org>
Thu, 22 May 2014 00:42:20 +0000 (10:42 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:42:20 +0000 (10:42 +1000)
commit0155b373fcb56fe46c46894963628297e53a435c
tree5cee73795b94b1a942011e447c0c1312f6c98079
parent9fa1e09dadd3b1f51c2ac307fa745de94a738f8f
mm: madvise: fix MADV_WILLNEED on shmem swapouts

MADV_WILLNEED currently does not read swapped out shmem pages back in.

0cd6144aadd2 ("mm + fs: prepare for non-page entries in page cache radix
trees") made find_get_page() filter exceptional radix tree entries but
failed to convert all find_get_page() callers that WANT exceptional
entries over to find_get_entry().  One of them is shmem swap readahead in
madvise, which now skips over any swap-out records.

Convert it to find_get_entry().

Fixes: 0cd6144aadd2 ("mm + fs: prepare for non-page entries in page cache radix trees")
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reported-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/madvise.c