Qu Wenruo 50628b06e6 btrfs: replace BUG_ON() in btrfs_csum_one_bio() with proper error handling
[ Upstream commit bbc9a6eb5eec03dcafee266b19f56295e3b2aa8f ]

There is a BUG_ON() in btrfs_csum_one_bio() to catch code logic error.
It has indeed caught several bugs during subpage development.
But the BUG_ON() itself will bring down the whole system which is
an overkill.

Replace it with a WARN() and exit gracefully, so that it won't crash the
whole system while we can still catch the code logic error.

Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-10-09 14:40:56 +02:00
..
2021-09-08 08:49:01 +02:00
2020-10-16 11:11:22 -07:00
2021-09-30 10:11:04 +02:00
2021-07-14 16:55:59 +02:00
2021-09-18 13:40:15 +02:00
2021-07-14 16:56:12 +02:00
2020-09-10 14:03:31 -07:00
2020-08-04 21:02:38 -04:00
2020-07-31 08:16:01 +02:00
2020-10-23 11:33:41 -07:00
2020-10-23 11:33:41 -07:00
2020-10-24 12:40:18 -07:00
2020-08-27 16:06:47 -04:00
2020-07-31 08:16:01 +02:00