Skip to content

Commit 4a9e803

Browse files
Damenlykdave
authored andcommitted
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: Qu Wenruo <[email protected]> Signed-off-by: Su Yue <[email protected]> Reviewed-by: David Sterba <[email protected]> Signed-off-by: David Sterba <[email protected]>
1 parent 856e479 commit 4a9e803

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

fs/btrfs/compression.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ static int compression_compress_pages(int type, struct list_head *ws,
9696
}
9797
}
9898

99-
static int compression_decompress_bio(int type, struct list_head *ws,
100-
struct compressed_bio *cb)
99+
static int compression_decompress_bio(struct list_head *ws,
100+
struct compressed_bio *cb)
101101
{
102-
switch (type) {
102+
switch (cb->compress_type) {
103103
case BTRFS_COMPRESS_ZLIB: return zlib_decompress_bio(ws, cb);
104104
case BTRFS_COMPRESS_LZO: return lzo_decompress_bio(ws, cb);
105105
case BTRFS_COMPRESS_ZSTD: return zstd_decompress_bio(ws, cb);
@@ -1360,7 +1360,7 @@ static int btrfs_decompress_bio(struct compressed_bio *cb)
13601360
int type = cb->compress_type;
13611361

13621362
workspace = get_workspace(type, 0);
1363-
ret = compression_decompress_bio(type, workspace, cb);
1363+
ret = compression_decompress_bio(workspace, cb);
13641364
put_workspace(type, workspace);
13651365

13661366
return ret;

0 commit comments

Comments
 (0)