btrfs: compression: inline get_workspace
Majority of the callbacks is trivial, we don't gain anything by the indirection, so replace them by a switch function. ZLIB needs to adjust level in the callback and ZSTD workspace management is complex, the rest is call to 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:
@@ -125,8 +125,6 @@ struct list_head *btrfs_get_workspace(struct workspace_manager *wsm,
|
||||
void btrfs_put_workspace(struct workspace_manager *wsm, struct list_head *ws);
|
||||
|
||||
struct btrfs_compress_op {
|
||||
struct list_head *(*get_workspace)(unsigned int level);
|
||||
|
||||
void (*put_workspace)(struct list_head *ws);
|
||||
|
||||
struct list_head *(*alloc_workspace)(unsigned int level);
|
||||
|
Reference in New Issue
Block a user