diff options
author | Jeff Mahoney <jeffm@suse.com> | 2011-10-04 05:23:14 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2012-03-22 01:45:34 +0100 |
commit | 355808c296c6923db6705f43639969a80b16d15d (patch) | |
tree | c8f7e1877935fcbfdb0937fea7cd2b29dc474f71 /fs/btrfs/disk-io.c | |
parent | btrfs: Factor out tree->ops->merge_bio_hook call (diff) | |
download | linux-355808c296c6923db6705f43639969a80b16d15d.tar.xz linux-355808c296c6923db6705f43639969a80b16d15d.zip |
btrfs: ->submit_bio_hook error push-up
This pushes failures from the submit_bio_hook callbacks,
btrfs_submit_bio_hook and btree_submit_bio_hook into the callers, including
callers of submit_one_bio where it catches the failures with BUG_ON.
It also pushes up through the ->readpage_io_failed_hook to
end_bio_extent_writepage where the error is already caught with BUG_ON.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Diffstat (limited to 'fs/btrfs/disk-io.c')
-rw-r--r-- | fs/btrfs/disk-io.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 155c4e35e536..2e4428bd60ec 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -847,9 +847,9 @@ static int btree_submit_bio_hook(struct inode *inode, int rw, struct bio *bio, { int ret; - ret = btrfs_bio_wq_end_io(BTRFS_I(inode)->root->fs_info, - bio, 1); - BUG_ON(ret); + ret = btrfs_bio_wq_end_io(BTRFS_I(inode)->root->fs_info, bio, 1); + if (ret) + return ret; if (!(rw & REQ_WRITE)) { /* |