]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Remove PageSwapBacked (!page_is_file_cache) cases from
authorHugh Dickins <hughd@google.com>
Wed, 3 Aug 2011 00:52:54 +0000 (10:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 16 Aug 2011 05:00:38 +0000 (15:00 +1000)
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>
mm/mincore.c

index 636a86876ff217a7f6d18f29c18524c2f2645a63..55556b05ef68b6a9f8727e2750c3a2f6a1a92db4 100644 (file)
@@ -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);
        }