diff options
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 96fcfa522dab..4f9893243dae 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/writeback.h> | 11 | #include <linux/writeback.h> |
12 | #include <linux/pagevec.h> | 12 | #include <linux/pagevec.h> |
13 | #include <linux/prefetch.h> | 13 | #include <linux/prefetch.h> |
14 | #include <linux/cleancache.h> | ||
14 | #include "extent_io.h" | 15 | #include "extent_io.h" |
15 | #include "extent_map.h" | 16 | #include "extent_map.h" |
16 | #include "compat.h" | 17 | #include "compat.h" |
@@ -2016,6 +2017,13 @@ static int __extent_read_full_page(struct extent_io_tree *tree, | |||
2016 | 2017 | ||
2017 | set_page_extent_mapped(page); | 2018 | set_page_extent_mapped(page); |
2018 | 2019 | ||
2020 | if (!PageUptodate(page)) { | ||
2021 | if (cleancache_get_page(page) == 0) { | ||
2022 | BUG_ON(blocksize != PAGE_SIZE); | ||
2023 | goto out; | ||
2024 | } | ||
2025 | } | ||
2026 | |||
2019 | end = page_end; | 2027 | end = page_end; |
2020 | while (1) { | 2028 | while (1) { |
2021 | lock_extent(tree, start, end, GFP_NOFS); | 2029 | lock_extent(tree, start, end, GFP_NOFS); |
@@ -2149,6 +2157,7 @@ static int __extent_read_full_page(struct extent_io_tree *tree, | |||
2149 | cur = cur + iosize; | 2157 | cur = cur + iosize; |
2150 | page_offset += iosize; | 2158 | page_offset += iosize; |
2151 | } | 2159 | } |
2160 | out: | ||
2152 | if (!nr) { | 2161 | if (!nr) { |
2153 | if (!PageError(page)) | 2162 | if (!PageError(page)) |
2154 | SetPageUptodate(page); | 2163 | SetPageUptodate(page); |