提交 4a9e803e 编写于 作者: S Su Yue 提交者: 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: NQu Wenruo <wqu@suse.com>
Signed-off-by: NSu Yue <l@damenly.su>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册