diff options
| author | Ingo Molnar <mingo@kernel.org> | 2014-05-07 13:15:46 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2014-05-07 13:15:46 +0200 |
| commit | 2fe5de9ce7d57498abc14b375cad2fcf8c3ee6cc (patch) | |
| tree | 9478e8cf470c1d5bdb2d89b57a7e35919ab95e72 /mm/mincore.c | |
| parent | 08f8aeb55d7727d644dbbbbfb798fe937d47751d (diff) | |
| parent | 2b4cfe64dee0d84506b951d81bf55d9891744d25 (diff) | |
| download | linux-2fe5de9ce7d57498abc14b375cad2fcf8c3ee6cc.tar.gz linux-2fe5de9ce7d57498abc14b375cad2fcf8c3ee6cc.tar.bz2 linux-2fe5de9ce7d57498abc14b375cad2fcf8c3ee6cc.zip | |
Merge branch 'sched/urgent' into sched/core, to avoid conflicts
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'mm/mincore.c')
| -rw-r--r-- | mm/mincore.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/mm/mincore.c b/mm/mincore.c index 101623378fbf..725c80961048 100644 --- a/mm/mincore.c +++ b/mm/mincore.c @@ -70,13 +70,21 @@ static unsigned char mincore_page(struct address_space *mapping, pgoff_t pgoff) * any other file mapping (ie. marked !present and faulted in with * tmpfs's .fault). So swapped out tmpfs mappings are tested here. */ - page = find_get_page(mapping, pgoff); #ifdef CONFIG_SWAP - /* shmem/tmpfs may return swap: account for swapcache page too. */ - if (radix_tree_exceptional_entry(page)) { - swp_entry_t swap = radix_to_swp_entry(page); - page = find_get_page(swap_address_space(swap), swap.val); - } + if (shmem_mapping(mapping)) { + page = find_get_entry(mapping, pgoff); + /* + * shmem/tmpfs may return swap: account for swapcache + * page too. + */ + if (radix_tree_exceptional_entry(page)) { + swp_entry_t swp = radix_to_swp_entry(page); + page = find_get_page(swap_address_space(swp), swp.val); + } + } else + page = find_get_page(mapping, pgoff); +#else + page = find_get_page(mapping, pgoff); #endif if (page) { present = PageUptodate(page); |
