diff options
author | Hugh Dickins <hughd@google.com> | 2011-08-03 19:21:27 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-03 20:25:24 -0400 |
commit | 31475dd611209413bace21651a400afb91d0bd9d (patch) | |
tree | 679c1cb33e211a4f2e5c0f47bb836393c9454d35 /mm/mincore.c | |
parent | 69f07ec938712b58755add82dd3d0b35f01317cc (diff) |
mm: a few small updates for radix-swap
Remove PageSwapBacked (!page_is_file_cache) cases from
add_to_page_cache_locked() and add_to_page_cache_lru(): those pages now
go through shmem_add_to_page_cache().
Remove a comment on maximum tmpfs size from fsstack_copy_inode_size(),
and add a comment on swap entries to invalidate_mapping_pages().
And mincore_page() uses find_get_page() on what might be shmem or a
tmpfs file: allow for a radix_tree_exceptional_entry(), and proceed to
find_get_page() on swapper_space if so (oh, swapper_space needs #ifdef).
Signed-off-by: Hugh Dickins <hughd@google.com>
Acked-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mincore.c')
-rw-r--r-- | mm/mincore.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mm/mincore.c b/mm/mincore.c index a4e6b9d75c76..733f1829b0dc 100644 --- a/mm/mincore.c +++ b/mm/mincore.c | |||
@@ -69,12 +69,14 @@ static unsigned char mincore_page(struct address_space *mapping, pgoff_t pgoff) | |||
69 | * file will not get a swp_entry_t in its pte, but rather it is like | 69 | * file will not get a swp_entry_t in its pte, but rather it is like |
70 | * any other file mapping (ie. marked !present and faulted in with | 70 | * any other file mapping (ie. marked !present and faulted in with |
71 | * tmpfs's .fault). So swapped out tmpfs mappings are tested here. | 71 | * tmpfs's .fault). So swapped out tmpfs mappings are tested here. |
72 | * | ||
73 | * However when tmpfs moves the page from pagecache and into swapcache, | ||
74 | * it is still in core, but the find_get_page below won't find it. | ||
75 | * No big deal, but make a note of it. | ||
76 | */ | 72 | */ |
77 | page = find_get_page(mapping, pgoff); | 73 | page = find_get_page(mapping, pgoff); |
74 | #ifdef CONFIG_SWAP | ||
75 | if (radix_tree_exceptional_entry(page)) { | ||
76 | swp_entry_t swap = radix_to_swp_entry(page); | ||
77 | page = find_get_page(&swapper_space, swap.val); | ||
78 | } | ||
79 | #endif | ||
78 | if (page) { | 80 | if (page) { |
79 | present = PageUptodate(page); | 81 | present = PageUptodate(page); |
80 | page_cache_release(page); | 82 | page_cache_release(page); |