aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2011-10-03 23:23:14 -0400
committerDavid Sterba <dsterba@suse.cz>2012-03-22 01:45:34 +0100
commit355808c296c6923db6705f43639969a80b16d15d (patch)
treec8f7e1877935fcbfdb0937fea7cd2b29dc474f71 /fs/btrfs/inode.c
parent3444a97255de907f32562741fb6d104620b9fce3 (diff)
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/inode.c')
-rw-r--r--fs/btrfs/inode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index ad1e88d2503..5394bdb314c 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1488,7 +1488,8 @@ static int btrfs_submit_bio_hook(struct inode *inode, int rw, struct bio *bio,
metadata = 2;
ret = btrfs_bio_wq_end_io(root->fs_info, bio, metadata);
- BUG_ON(ret);
+ if (ret)
+ return ret;
if (!(rw & REQ_WRITE)) {
if (bio_flags & EXTENT_BIO_COMPRESSED) {