summaryrefslogtreecommitdiff
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2016-06-23 01:31:49 (GMT)
committerDavid Sterba <dsterba@suse.com>2016-07-26 11:52:25 (GMT)
commit6f034ece3422d8d4fbe0afe7cd8c2ac6438e651e (patch)
tree6fdb039ab1960d335bb981df75a8839d5421933b /fs/btrfs/extent_io.c
parentfba4b697710eb2a4bee456b9d39e9239c66f8bee (diff)
downloadlinux-6f034ece3422d8d4fbe0afe7cd8c2ac6438e651e.tar.xz
Btrfs: cleanup BUG_ON in merge_bio
One can use btrfs-corrupt-block to hit BUG_ON() in merge_bio(), thus this aims to stop anyone to panic the whole system by using their btrfs. Since the error in merge_bio can only come from __btrfs_map_block() when chunk tree mapping has something insane and __btrfs_map_block() has already had printed the reason, we can just return errors in merge_bio. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r--fs/btrfs/extent_io.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 9aaa544..ea12d0e 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2756,7 +2756,6 @@ static int merge_bio(int rw, struct extent_io_tree *tree, struct page *page,
if (tree->ops && tree->ops->merge_bio_hook)
ret = tree->ops->merge_bio_hook(rw, page, offset, size, bio,
bio_flags);
- BUG_ON(ret < 0);
return ret;
}