Commit e14bfdb5 authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba

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: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent b0bbc8a3
...@@ -234,7 +234,7 @@ static bool dec_and_test_compressed_bio(struct compressed_bio *cb, struct bio *b ...@@ -234,7 +234,7 @@ static bool dec_and_test_compressed_bio(struct compressed_bio *cb, struct bio *b
return last_io; 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; unsigned int index;
struct page *page; struct page *page;
...@@ -253,8 +253,6 @@ static void finish_compressed_bio_read(struct compressed_bio *cb, struct bio *bi ...@@ -253,8 +253,6 @@ static void finish_compressed_bio_read(struct compressed_bio *cb, struct bio *bi
struct bio_vec *bvec; struct bio_vec *bvec;
struct bvec_iter_all iter_all; struct bvec_iter_all iter_all;
ASSERT(bio);
ASSERT(!bio->bi_status);
/* /*
* We have verified the checksum already, set page checked so * We have verified the checksum already, set page checked so
* the end_io handlers know about it * the end_io handlers know about it
...@@ -325,7 +323,7 @@ static void end_compressed_bio_read(struct bio *bio) ...@@ -325,7 +323,7 @@ static void end_compressed_bio_read(struct bio *bio)
csum_failed: csum_failed:
if (ret) if (ret)
cb->errors = 1; cb->errors = 1;
finish_compressed_bio_read(cb, bio); finish_compressed_bio_read(cb);
out: out:
bio_put(bio); bio_put(bio);
} }
...@@ -973,7 +971,7 @@ blk_status_t btrfs_submit_compressed_read(struct inode *inode, struct bio *bio, ...@@ -973,7 +971,7 @@ blk_status_t btrfs_submit_compressed_read(struct inode *inode, struct bio *bio,
*/ */
ASSERT(refcount_read(&cb->pending_sectors)); ASSERT(refcount_read(&cb->pending_sectors));
/* Now we are the only one referring @cb, can finish it safely. */ /* 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; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment