mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
btrfs: compression: inline put_workspace
Similar to get_workspace, majority of the callbacks is trivial, we don't gain anything by the indirection, so replace them by a switch function. Trivial callback implementations use the helper. Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
6a0d12724b
commit
bd3a5287cc
5 changed files with 15 additions and 24 deletions
|
@ -39,11 +39,6 @@ struct list_head *zlib_get_workspace(unsigned int level)
|
|||
return ws;
|
||||
}
|
||||
|
||||
void zlib_put_workspace(struct list_head *ws)
|
||||
{
|
||||
btrfs_put_workspace(&wsm, ws);
|
||||
}
|
||||
|
||||
void zlib_free_workspace(struct list_head *ws)
|
||||
{
|
||||
struct workspace *workspace = list_entry(ws, struct workspace, list);
|
||||
|
@ -405,7 +400,6 @@ next:
|
|||
|
||||
const struct btrfs_compress_op btrfs_zlib_compress = {
|
||||
.workspace_manager = &wsm,
|
||||
.put_workspace = zlib_put_workspace,
|
||||
.alloc_workspace = zlib_alloc_workspace,
|
||||
.free_workspace = zlib_free_workspace,
|
||||
.max_level = 9,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue