diff options
author | Christoph Hellwig <hch@lst.de> | 2022-07-07 07:33:31 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2022-07-25 19:56:16 +0200 |
commit | 0b078d9db8793b1bd911e97be854e3c964235c78 (patch) | |
tree | cab37582986dbf785fd082cc79590e1f7ab842b9 /fs/btrfs/compression.c | |
parent | 81bd9328ab9f9bf818923b92a64896fd4cf58f2b (diff) |
btrfs: don't call btrfs_page_set_checked in finish_compressed_bio_read
This flag was used to communicate that the low-level compression code
already did verify the checksum to the high-level I/O completion code.
But it has been unused for a long time as the upper btrfs_bio for the
decompressed data had a NULL csum pointer basically since that pointer
existed and the code already checks for that a little later.
Note that this does not affect the other use of the checked flag, which
is only used for the COW fixup worker.
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/compression.c')
-rw-r--r-- | fs/btrfs/compression.c | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 8124cd3d0b6b..f3df9b9b4381 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -152,29 +152,9 @@ static void finish_compressed_bio_read(struct compressed_bio *cb) } /* Do io completion on the original bio */ - if (cb->status != BLK_STS_OK) { + if (cb->status != BLK_STS_OK) cb->orig_bio->bi_status = cb->status; - bio_endio(cb->orig_bio); - } else { - struct bio_vec *bvec; - struct bvec_iter_all iter_all; - - /* - * We have verified the checksum already, set page checked so - * the end_io handlers know about it - */ - ASSERT(!bio_flagged(cb->orig_bio, BIO_CLONED)); - bio_for_each_segment_all(bvec, cb->orig_bio, iter_all) { - u64 bvec_start = page_offset(bvec->bv_page) + - bvec->bv_offset; - - btrfs_page_set_checked(btrfs_sb(cb->inode->i_sb), - bvec->bv_page, bvec_start, - bvec->bv_len); - } - - bio_endio(cb->orig_bio); - } + bio_endio(cb->orig_bio); /* Finally free the cb struct */ kfree(cb->compressed_pages); |