]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: check correct bio in finish_compressed_bio_read
authorJosef Bacik <josef@toxicpanda.com>
Fri, 18 Feb 2022 15:03:24 +0000 (10:03 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Mar 2022 12:13:51 +0000 (13:13 +0100)
commit2c7e1b0618201b6f24e865f616139be9d2418e63
tree36acc071737aaa3f25d3e78b4429778baa456f28
parent6650879c5970c8bb8291294637b38a43f3af71a0
btrfs: check correct bio in finish_compressed_bio_read

Commit f67579bdb08b ("btrfs: cloned bios must not be iterated by
bio_for_each_segment_all") added ASSERT()'s to make sure we weren't
calling bio_for_each_segment_all() on a RAID5/6 bio.  However it was
checking the bio that the compression code passed in, not the
cb->orig_bio that we actually iterate over, so adjust this ASSERT() to
check the correct bio.

Reviewed-by: Boris Burkov <boris@bur.io>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c