summaryrefslogtreecommitdiff
path: root/fs/btrfs/zlib.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-10-04 02:21:48 +0200
committerDavid Sterba <dsterba@suse.com>2019-11-18 12:46:58 +0100
commitd20f395f98959dee592cf05af0bec7ab5b185e5e (patch)
treee8b3580f2f3c0fdee2b34fc7f85f83611c2d8dd7 /fs/btrfs/zlib.c
parent2510307e6c78d1d9a59c85164cbff66f8a9f3fed (diff)
downloadlwn-d20f395f98959dee592cf05af0bec7ab5b185e5e.tar.gz
lwn-d20f395f98959dee592cf05af0bec7ab5b185e5e.zip
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>
Diffstat (limited to 'fs/btrfs/zlib.c')
-rw-r--r--fs/btrfs/zlib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/zlib.c b/fs/btrfs/zlib.c
index 03c632c7deac..f2a56e999e5f 100644
--- a/fs/btrfs/zlib.c
+++ b/fs/btrfs/zlib.c
@@ -29,7 +29,7 @@ struct workspace {
static struct workspace_manager wsm;
-static struct list_head *zlib_get_workspace(unsigned int level)
+struct list_head *zlib_get_workspace(unsigned int level)
{
struct list_head *ws = btrfs_get_workspace(&wsm, level);
struct workspace *workspace = list_entry(ws, struct workspace, list);
@@ -39,12 +39,12 @@ static struct list_head *zlib_get_workspace(unsigned int level)
return ws;
}
-static void zlib_put_workspace(struct list_head *ws)
+void zlib_put_workspace(struct list_head *ws)
{
btrfs_put_workspace(&wsm, ws);
}
-static void zlib_free_workspace(struct list_head *ws)
+void zlib_free_workspace(struct list_head *ws)
{
struct workspace *workspace = list_entry(ws, struct workspace, list);
@@ -53,7 +53,7 @@ static void zlib_free_workspace(struct list_head *ws)
kfree(workspace);
}
-static struct list_head *zlib_alloc_workspace(unsigned int level)
+struct list_head *zlib_alloc_workspace(unsigned int level)
{
struct workspace *workspace;
int workspacesize;