Commit 5c3ce5b2b6bd0c685914b68c1e6106278845add0
Committed by
Jiri Slaby
1 parent
e714f0cf03
Exists in
ti-linux-3.12.y
and in
2 other branches
mm: madvise: fix MADV_WILLNEED on shmem swapouts
commit 55231e5c898c5c03c14194001e349f40f59bd300 upstream. MADV_WILLNEED currently does not read swapped out shmem pages back in. Commit 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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Mel Gorman <mgorman@suse.de> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff
mm/madvise.c
... | ... | @@ -195,7 +195,7 @@ |
195 | 195 | for (; start < end; start += PAGE_SIZE) { |
196 | 196 | index = ((start - vma->vm_start) >> PAGE_SHIFT) + vma->vm_pgoff; |
197 | 197 | |
198 | - page = find_get_page(mapping, index); | |
198 | + page = find_get_entry(mapping, index); | |
199 | 199 | if (!radix_tree_exceptional_entry(page)) { |
200 | 200 | if (page) |
201 | 201 | page_cache_release(page); |