]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: cleanup BUG_ON in merge_bio
authorLiu Bo <bo.li.liu@oracle.com>
Thu, 23 Jun 2016 01:31:49 +0000 (18:31 -0700)
committerDavid Sterba <dsterba@suse.com>
Tue, 26 Jul 2016 11:52:25 +0000 (13:52 +0200)
commit1f22d59c2bc46d52ef6227a22403333b2d554798
tree6fdb039ab1960d335bb981df75a8839d5421933b
parentd7130c95909fcc8a1e4bcd2ff600fe1e4a14cbb7
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>
fs/btrfs/extent_io.c
fs/btrfs/inode.c