summaryrefslogtreecommitdiffstats
path: root/fs/mpage.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-26 10:50:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-26 10:50:56 -0700
commitf8d613e2a665bf1be9628a3c3f9bafe7599b32c0 (patch)
tree98d4da8d0e1a5fb1d9064626b4b96d95ccf26375 /fs/mpage.c
parent8a0599dd2471f2a2e409498c08a0ab339057ad06 (diff)
parent5bc20fc59706214d9591c11e1938a629d3538c12 (diff)
downloadop-kernel-dev-f8d613e2a665bf1be9628a3c3f9bafe7599b32c0.zip
op-kernel-dev-f8d613e2a665bf1be9628a3c3f9bafe7599b32c0.tar.gz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/djm/tmem
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/djm/tmem: xen: cleancache shim to Xen Transcendent Memory ocfs2: add cleancache support ext4: add cleancache support btrfs: add cleancache support ext3: add cleancache support mm/fs: add hooks to support cleancache mm: cleancache core ops functions and config fs: add field to superblock to support cleancache mm/fs: cleancache documentation Fix up trivial conflict in fs/btrfs/extent_io.c due to includes
Diffstat (limited to 'fs/mpage.c')
-rw-r--r--fs/mpage.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/mpage.c b/fs/mpage.c
index 0afc809..fdfae9f 100644
--- a/fs/mpage.c
+++ b/fs/mpage.c
@@ -27,6 +27,7 @@
#include <linux/writeback.h>
#include <linux/backing-dev.h>
#include <linux/pagevec.h>
+#include <linux/cleancache.h>
/*
* I/O completion handler for multipage BIOs.
@@ -271,6 +272,12 @@ do_mpage_readpage(struct bio *bio, struct page *page, unsigned nr_pages,
SetPageMappedToDisk(page);
}
+ if (fully_mapped && blocks_per_page == 1 && !PageUptodate(page) &&
+ cleancache_get_page(page) == 0) {
+ SetPageUptodate(page);
+ goto confused;
+ }
+
/*
* This page will go to BIO. Do we need to send this BIO off first?
*/
OpenPOWER on IntegriCloud