diff options
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index b181a94a717..7055d11c1ef 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -10,6 +10,8 @@ #include <linux/swap.h> #include <linux/writeback.h> #include <linux/pagevec.h> +#include <linux/prefetch.h> +#include <linux/cleancache.h> #include "extent_io.h" #include "extent_map.h" #include "compat.h" @@ -1969,6 +1971,13 @@ static int __extent_read_full_page(struct extent_io_tree *tree, set_page_extent_mapped(page); + if (!PageUptodate(page)) { + if (cleancache_get_page(page) == 0) { + BUG_ON(blocksize != PAGE_SIZE); + goto out; + } + } + end = page_end; while (1) { lock_extent(tree, start, end, GFP_NOFS); @@ -2102,6 +2111,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree, cur = cur + iosize; pg_offset += iosize; } +out: if (!nr) { if (!PageError(page)) SetPageUptodate(page); |