btrfs: check correct bio in finish_compressed_bio_read
authorJosef Bacik <josef@toxicpanda.com>
Thu, 10 Feb 2022 22:44:21 +0000 (17:44 -0500)
committerDavid Sterba <dsterba@suse.com>
Tue, 15 Feb 2022 15:55:32 +0000 (16:55 +0100)
commit7be76c9a78c5d1aa251f9e9f4a6af3491b4a2ca9
tree950463a874fdd1df98e53a938fd62d743e602aa6
parent79e89e2bc908731f5aded8084f9988c648c3852f
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>
Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/compression.c