Commit 4a9e803e authored by Su Yue's avatar Su Yue Committed by David Sterba

btrfs: remove unnecessary parameter type from compression_decompress_bio

btrfs_decompress_bio, the only caller of compression_decompress_bio gets
type from @cb and passes it to compression_decompress_bio.
However, compression_decompress_bio can get compression type directly
from @cb.

So remove the parameter and access it through @cb.  No functional
change.
Reviewed-by: default avatarQu Wenruo <wqu@suse.com>
Signed-off-by: default avatarSu Yue <l@damenly.su>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 856e4794
......@@ -96,10 +96,10 @@ static int compression_compress_pages(int type, struct list_head *ws,
}
}
static int compression_decompress_bio(int type, struct list_head *ws,
struct compressed_bio *cb)
static int compression_decompress_bio(struct list_head *ws,
struct compressed_bio *cb)
{
switch (type) {
switch (cb->compress_type) {
case BTRFS_COMPRESS_ZLIB: return zlib_decompress_bio(ws, cb);
case BTRFS_COMPRESS_LZO: return lzo_decompress_bio(ws, cb);
case BTRFS_COMPRESS_ZSTD: return zstd_decompress_bio(ws, cb);
......@@ -1360,7 +1360,7 @@ static int btrfs_decompress_bio(struct compressed_bio *cb)
int type = cb->compress_type;
workspace = get_workspace(type, 0);
ret = compression_decompress_bio(type, workspace, cb);
ret = compression_decompress_bio(workspace, cb);
put_workspace(type, workspace);
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