btrfs: remove the bio argument from finish_compressed_bio_read
authorJosef Bacik <josef@toxicpanda.com>
Fri, 18 Feb 2022 15:03:25 +0000 (10:03 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Mar 2022 12:13:51 +0000 (13:13 +0100)
This bio is usually one of the compressed bio's, and we don't actually
need it in this function, so remove the argument and stop passing it
around.

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

index cba3a84..14409b3 100644 (file)
@@ -234,7 +234,7 @@ static bool dec_and_test_compressed_bio(struct compressed_bio *cb, struct bio *b
        return last_io;
 }
 
-static void finish_compressed_bio_read(struct compressed_bio *cb, struct bio *bio)
+static void finish_compressed_bio_read(struct compressed_bio *cb)
 {
        unsigned int index;
        struct page *page;
@@ -253,8 +253,6 @@ static void finish_compressed_bio_read(struct compressed_bio *cb, struct bio *bi
                struct bio_vec *bvec;
                struct bvec_iter_all iter_all;
 
-               ASSERT(bio);
-               ASSERT(!bio->bi_status);
                /*
                 * We have verified the checksum already, set page checked so
                 * the end_io handlers know about it
@@ -325,7 +323,7 @@ static void end_compressed_bio_read(struct bio *bio)
 csum_failed:
        if (ret)
                cb->errors = 1;
-       finish_compressed_bio_read(cb, bio);
+       finish_compressed_bio_read(cb);
 out:
        bio_put(bio);
 }
@@ -973,7 +971,7 @@ finish_cb:
         */
        ASSERT(refcount_read(&cb->pending_sectors));
        /* Now we are the only one referring @cb, can finish it safely. */
-       finish_compressed_bio_read(cb, NULL);
+       finish_compressed_bio_read(cb);
        return ret;
 }