From: Hugh Dickins Date: Wed, 3 Aug 2011 00:52:54 +0000 (+1000) Subject: Remove PageSwapBacked (!page_is_file_cache) cases from X-Git-Tag: next-20110822~1^2~34 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=9b859759c0ddefba7aeac8991876ccf6e655a328;p=karo-tx-linux.git 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 Acked-by: Rik van Riel Signed-off-by: Andrew Morton --- diff --git a/mm/mincore.c b/mm/mincore.c index 636a86876ff2..55556b05ef68 100644 --- a/mm/mincore.c +++ b/mm/mincore.c @@ -79,6 +79,12 @@ static unsigned char mincore_page(struct address_space *mapping, pgoff_t pgoff) } #endif if (page) { +#ifdef CONFIG_SWAP + if (radix_tree_exceptional_entry(page)) { + swp_entry_t swap = radix_to_swp_entry(page); + page = find_get_page(&swapper_space, swap.val); + } +#endif present = PageUptodate(page); page_cache_release(page); }