diff options
author | Josef Bacik <josef@toxicpanda.com> | 2022-02-18 16:03:25 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-03-14 13:13:51 +0100 |
commit | e14bfdb5a1f5fbb0a45f64a763c8da00637072d1 (patch) | |
tree | 13ca751521c51d7ff7eb4a6dd9a8827f6721b2ad /fs/btrfs | |
parent | btrfs: check correct bio in finish_compressed_bio_read (diff) | |
download | linux-e14bfdb5a1f5fbb0a45f64a763c8da00637072d1.tar.xz linux-e14bfdb5a1f5fbb0a45f64a763c8da00637072d1.zip |
btrfs: remove the bio argument from finish_compressed_bio_read
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>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/compression.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index cba3a844f21d..14409b3c838a 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -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; } |