]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
btrfs: extent_io: Move the BUG_ON() in flush_write_bio() one level up
authorQu Wenruo <wqu@suse.com>
Wed, 20 Mar 2019 06:27:41 +0000 (14:27 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Nov 2020 11:35:55 +0000 (12:35 +0100)
commit63ece3bb01489e3942bc15e4aa976afcb3cd864f
treedca616e165e3970238d8dbf12b5a0caa1dc804b4
parent7f2b9e8d42bd957332dc2af0ba6a77684fe32b1c
btrfs: extent_io: Move the BUG_ON() in flush_write_bio() one level up

commit f4340622e02261fae599e3da936ff4808b418173 upstream.

We have a BUG_ON() in flush_write_bio() to handle the return value of
submit_one_bio().

Move the BUG_ON() one level up to all its callers.

This patch will introduce temporary variable, @flush_ret to keep code
change minimal in this patch. That variable will be cleaned up when
enhancing the error handling later.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
[bwh: Cherry-picked for 4.19 to ease backporting later fixes]
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/btrfs/extent_io.c