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.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index b68e57f66a96..fcae999ab712 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2859,8 +2859,8 @@ EXPORT_SYMBOL(extent_buffer_uptodate);
2859 2859
2860int read_extent_buffer_pages(struct extent_io_tree *tree, 2860int read_extent_buffer_pages(struct extent_io_tree *tree,
2861 struct extent_buffer *eb, 2861 struct extent_buffer *eb,
2862 u64 start, 2862 u64 start, int wait,
2863 int wait) 2863 get_extent_t *get_extent)
2864{ 2864{
2865 unsigned long i; 2865 unsigned long i;
2866 unsigned long start_i; 2866 unsigned long start_i;
@@ -2868,6 +2868,8 @@ int read_extent_buffer_pages(struct extent_io_tree *tree,
2868 int err; 2868 int err;
2869 int ret = 0; 2869 int ret = 0;
2870 unsigned long num_pages; 2870 unsigned long num_pages;
2871 struct bio *bio = NULL;
2872
2871 2873
2872 if (eb->flags & EXTENT_UPTODATE) 2874 if (eb->flags & EXTENT_UPTODATE)
2873 return 0; 2875 return 0;
@@ -2899,7 +2901,8 @@ int read_extent_buffer_pages(struct extent_io_tree *tree,
2899 lock_page(page); 2901 lock_page(page);
2900 } 2902 }
2901 if (!PageUptodate(page)) { 2903 if (!PageUptodate(page)) {
2902 err = page->mapping->a_ops->readpage(NULL, page); 2904 err = __extent_read_full_page(tree, page,
2905 get_extent, &bio);
2903 if (err) { 2906 if (err) {
2904 ret = err; 2907 ret = err;
2905 } 2908 }
@@ -2908,6 +2911,9 @@ int read_extent_buffer_pages(struct extent_io_tree *tree,
2908 } 2911 }
2909 } 2912 }
2910 2913
2914 if (bio)
2915 submit_one_bio(READ, bio);
2916
2911 if (ret || !wait) { 2917 if (ret || !wait) {
2912 return ret; 2918 return ret;
2913 } 2919 }