aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index bd15cdcaba95..40a5f53cb040 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2808,10 +2808,15 @@ struct extent_buffer *find_extent_buffer(struct extent_io_tree *tree,
2808 goto lru_add; 2808 goto lru_add;
2809 2809
2810 for (i = 0; i < num_pages; i++, index++) { 2810 for (i = 0; i < num_pages; i++, index++) {
2811 p = find_lock_page(mapping, index); 2811 p = find_get_page(mapping, index);
2812 if (!p) { 2812 if (!p) {
2813 goto fail; 2813 goto fail;
2814 } 2814 }
2815 if (TestSetPageLocked(p)) {
2816 page_cache_release(p);
2817 goto fail;
2818 }
2819
2815 set_page_extent_mapped(p); 2820 set_page_extent_mapped(p);
2816 mark_page_accessed(p); 2821 mark_page_accessed(p);
2817 2822