btrfs: compression: export alloc/free/get/put callbacks of all algos
The indirect calls will be replaced by a switch in compression.c. (Switch is faster than indirect calls with when Spectre mitigations are enabled). 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:
@@ -63,17 +63,17 @@ struct workspace {
|
||||
|
||||
static struct workspace_manager wsm;
|
||||
|
||||
static struct list_head *lzo_get_workspace(unsigned int level)
|
||||
struct list_head *lzo_get_workspace(unsigned int level)
|
||||
{
|
||||
return btrfs_get_workspace(&wsm, level);
|
||||
}
|
||||
|
||||
static void lzo_put_workspace(struct list_head *ws)
|
||||
void lzo_put_workspace(struct list_head *ws)
|
||||
{
|
||||
btrfs_put_workspace(&wsm, ws);
|
||||
}
|
||||
|
||||
static void lzo_free_workspace(struct list_head *ws)
|
||||
void lzo_free_workspace(struct list_head *ws)
|
||||
{
|
||||
struct workspace *workspace = list_entry(ws, struct workspace, list);
|
||||
|
||||
@@ -83,7 +83,7 @@ static void lzo_free_workspace(struct list_head *ws)
|
||||
kfree(workspace);
|
||||
}
|
||||
|
||||
static struct list_head *lzo_alloc_workspace(unsigned int level)
|
||||
struct list_head *lzo_alloc_workspace(unsigned int level)
|
||||
{
|
||||
struct workspace *workspace;
|
||||
|
||||
|
Reference in New Issue
Block a user