Skip to content

Commit

Permalink
btrfs: lzo: drop unused paramter level from lzo_alloc_workspace()
Browse files Browse the repository at this point in the history
The LZO compression has only one level, we don't need to pass the
parameter.

Reviewed-by: Anand Jain <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
kdave committed Nov 11, 2024
1 parent d7f4b4e commit 3f4b1bc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fs/btrfs/compression.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ static struct list_head *alloc_workspace(int type, unsigned int level)
switch (type) {
case BTRFS_COMPRESS_NONE: return alloc_heuristic_ws(level);
case BTRFS_COMPRESS_ZLIB: return zlib_alloc_workspace(level);
case BTRFS_COMPRESS_LZO: return lzo_alloc_workspace(level);
case BTRFS_COMPRESS_LZO: return lzo_alloc_workspace();
case BTRFS_COMPRESS_ZSTD: return zstd_alloc_workspace(level);
default:
/*
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/compression.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ int lzo_decompress_bio(struct list_head *ws, struct compressed_bio *cb);
int lzo_decompress(struct list_head *ws, const u8 *data_in,
struct folio *dest_folio, unsigned long dest_pgoff, size_t srclen,
size_t destlen);
struct list_head *lzo_alloc_workspace(unsigned int level);
struct list_head *lzo_alloc_workspace(void);
void lzo_free_workspace(struct list_head *ws);

int zstd_compress_folios(struct list_head *ws, struct address_space *mapping,
Expand Down
2 changes: 1 addition & 1 deletion fs/btrfs/lzo.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ void lzo_free_workspace(struct list_head *ws)
kfree(workspace);
}

struct list_head *lzo_alloc_workspace(unsigned int level)
struct list_head *lzo_alloc_workspace(void)
{
struct workspace *workspace;

Expand Down

0 comments on commit 3f4b1bc

Please sign in to comment.