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, 28 Feb 2022 15:20:03 +0000 (16:20 +0100)
commitebeb0d36118907421485985e53ee064bc086b30e
tree2ea431f4acc6e539cbddc035c1fe9cae3c7e5d6b
parent711ac8e9e6c29b7bcfc7d91326f858920471dad3
btrfs: check correct bio in finish_compressed_bio_read

Commit c09abff87f90 ("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