diff options
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index f739b256967e..04e9fffee8cc 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -1467,8 +1467,11 @@ static int btrfs_submit_bio_hook(struct inode *inode, int rw, struct bio *bio, | |||
1467 | if (bio_flags & EXTENT_BIO_COMPRESSED) { | 1467 | if (bio_flags & EXTENT_BIO_COMPRESSED) { |
1468 | return btrfs_submit_compressed_read(inode, bio, | 1468 | return btrfs_submit_compressed_read(inode, bio, |
1469 | mirror_num, bio_flags); | 1469 | mirror_num, bio_flags); |
1470 | } else if (!skip_sum) | 1470 | } else if (!skip_sum) { |
1471 | btrfs_lookup_bio_sums(root, inode, bio, NULL); | 1471 | ret = btrfs_lookup_bio_sums(root, inode, bio, NULL); |
1472 | if (ret) | ||
1473 | return ret; | ||
1474 | } | ||
1472 | goto mapit; | 1475 | goto mapit; |
1473 | } else if (!skip_sum) { | 1476 | } else if (!skip_sum) { |
1474 | /* csum items have already been cloned */ | 1477 | /* csum items have already been cloned */ |
@@ -1903,10 +1906,10 @@ static int btrfs_io_failed_hook(struct bio *failed_bio, | |||
1903 | else | 1906 | else |
1904 | rw = READ; | 1907 | rw = READ; |
1905 | 1908 | ||
1906 | BTRFS_I(inode)->io_tree.ops->submit_bio_hook(inode, rw, bio, | 1909 | ret = BTRFS_I(inode)->io_tree.ops->submit_bio_hook(inode, rw, bio, |
1907 | failrec->last_mirror, | 1910 | failrec->last_mirror, |
1908 | failrec->bio_flags, 0); | 1911 | failrec->bio_flags, 0); |
1909 | return 0; | 1912 | return ret; |
1910 | } | 1913 | } |
1911 | 1914 | ||
1912 | /* | 1915 | /* |
@@ -5943,9 +5946,12 @@ static inline int __btrfs_submit_dio_bio(struct bio *bio, struct inode *inode, | |||
5943 | __btrfs_submit_bio_start_direct_io, | 5946 | __btrfs_submit_bio_start_direct_io, |
5944 | __btrfs_submit_bio_done); | 5947 | __btrfs_submit_bio_done); |
5945 | goto err; | 5948 | goto err; |
5946 | } else if (!skip_sum) | 5949 | } else if (!skip_sum) { |
5947 | btrfs_lookup_bio_sums_dio(root, inode, bio, | 5950 | ret = btrfs_lookup_bio_sums_dio(root, inode, bio, |
5948 | file_offset, csums); | 5951 | file_offset, csums); |
5952 | if (ret) | ||
5953 | goto err; | ||
5954 | } | ||
5949 | 5955 | ||
5950 | ret = btrfs_map_bio(root, rw, bio, 0, 1); | 5956 | ret = btrfs_map_bio(root, rw, bio, 0, 1); |
5951 | err: | 5957 | err: |