commit | 0cd6144aadd2afd19d1aca880153530c52957604 | [log] [tgz] |
---|---|---|
author | Johannes Weiner <[email protected]> | Thu Apr 03 14:47:46 2014 -0700 |
committer | Linus Torvalds <[email protected]> | Thu Apr 03 16:21:00 2014 -0700 |
tree | 529df1dc75d6a58eff057dde5feb07cecf6ba527 | |
parent | e7b563bb2a6f4d974208da46200784b9c5b5a47e [diff] [blame] |
mm + fs: prepare for non-page entries in page cache radix trees shmem mappings already contain exceptional entries where swap slot information is remembered. To be able to store eviction information for regular page cache, prepare every site dealing with the radix trees directly to handle entries other than pages. The common lookup functions will filter out non-page entries and return NULL for page cache holes, just as before. But provide a raw version of the API which returns non-page entries as well, and switch shmem over to use it. Signed-off-by: Johannes Weiner <[email protected]> Reviewed-by: Rik van Riel <[email protected]> Reviewed-by: Minchan Kim <[email protected]> Cc: Andrea Arcangeli <[email protected]> Cc: Bob Liu <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Dave Chinner <[email protected]> Cc: Greg Thelen <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Jan Kara <[email protected]> Cc: KOSAKI Motohiro <[email protected]> Cc: Luigi Semenzato <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Metin Doslu <[email protected]> Cc: Michel Lespinasse <[email protected]> Cc: Ozgun Erdogan <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Roman Gushchin <[email protected]> Cc: Ryan Mallon <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Vlastimil Babka <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index b01fb6c..d43c544 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c
@@ -472,7 +472,7 @@ rcu_read_lock(); page = radix_tree_lookup(&mapping->page_tree, pg_index); rcu_read_unlock(); - if (page) { + if (page && !radix_tree_exceptional_entry(page)) { misses++; if (misses > 4) break;