diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2011-09-15 15:08:05 +0200 | 
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2011-09-15 15:08:18 +0200 | 
| commit | e060c38434b2caa78efe7cedaff4191040b65a15 (patch) | |
| tree | 407361230bf6733f63d8e788e4b5e6566ee04818 /mm/mincore.c | |
| parent | 10e4ac572eeffe5317019bd7330b6058a400dfc2 (diff) | |
| parent | cc39c6a9bbdebfcf1a7dee64d83bf302bc38d941 (diff) | |
| download | olio-linux-3.10-e060c38434b2caa78efe7cedaff4191040b65a15.tar.xz olio-linux-3.10-e060c38434b2caa78efe7cedaff4191040b65a15.zip  | |
Merge branch 'master' into for-next
Fast-forward merge with Linus to be able to merge patches
based on more recent version of the tree.
Diffstat (limited to 'mm/mincore.c')
| -rw-r--r-- | mm/mincore.c | 11 | 
1 files changed, 7 insertions, 4 deletions
diff --git a/mm/mincore.c b/mm/mincore.c index a4e6b9d75c7..636a86876ff 100644 --- a/mm/mincore.c +++ b/mm/mincore.c @@ -69,12 +69,15 @@ static unsigned char mincore_page(struct address_space *mapping, pgoff_t pgoff)  	 * file will not get a swp_entry_t in its pte, but rather it is like  	 * any other file mapping (ie. marked !present and faulted in with  	 * tmpfs's .fault). So swapped out tmpfs mappings are tested here. -	 * -	 * However when tmpfs moves the page from pagecache and into swapcache, -	 * it is still in core, but the find_get_page below won't find it. -	 * No big deal, but make a note of it.  	 */  	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(&swapper_space, swap.val); +	} +#endif  	if (page) {  		present = PageUptodate(page);  		page_cache_release(page);  |