diff options
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index c3dfe2a0ec85..7449ecf32c50 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c | |||
@@ -1732,6 +1732,9 @@ static void end_bio_extent_readpage(struct bio *bio, int err) | |||
1732 | int whole_page; | 1732 | int whole_page; |
1733 | int ret; | 1733 | int ret; |
1734 | 1734 | ||
1735 | if (err) | ||
1736 | uptodate = 0; | ||
1737 | |||
1735 | do { | 1738 | do { |
1736 | struct page *page = bvec->bv_page; | 1739 | struct page *page = bvec->bv_page; |
1737 | tree = &BTRFS_I(page->mapping->host)->io_tree; | 1740 | tree = &BTRFS_I(page->mapping->host)->io_tree; |
@@ -1761,6 +1764,8 @@ static void end_bio_extent_readpage(struct bio *bio, int err) | |||
1761 | if (ret == 0) { | 1764 | if (ret == 0) { |
1762 | uptodate = | 1765 | uptodate = |
1763 | test_bit(BIO_UPTODATE, &bio->bi_flags); | 1766 | test_bit(BIO_UPTODATE, &bio->bi_flags); |
1767 | if (err) | ||
1768 | uptodate = 0; | ||
1764 | continue; | 1769 | continue; |
1765 | } | 1770 | } |
1766 | } | 1771 | } |