aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/lzo.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-10-04 02:36:16 +0200
committerDavid Sterba <dsterba@suse.com>2019-11-18 12:46:58 +0100
commit6a0d12724bd2dd1c766769578e221ce1d10a4656 (patch)
treede49c7bedeab33d6e807ee65ff63541d1a4d9361 /fs/btrfs/lzo.c
parentbtrfs: compression: export alloc/free/get/put callbacks of all algos (diff)
downloadlinux-dev-6a0d12724bd2dd1c766769578e221ce1d10a4656.tar.xz
linux-dev-6a0d12724bd2dd1c766769578e221ce1d10a4656.zip
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>
Diffstat (limited to 'fs/btrfs/lzo.c')
-rw-r--r--fs/btrfs/lzo.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/btrfs/lzo.c b/fs/btrfs/lzo.c
index 18018619c019..821e5c137971 100644
--- a/fs/btrfs/lzo.c
+++ b/fs/btrfs/lzo.c
@@ -63,11 +63,6 @@ struct workspace {
static struct workspace_manager wsm;
-struct list_head *lzo_get_workspace(unsigned int level)
-{
- return btrfs_get_workspace(&wsm, level);
-}
-
void lzo_put_workspace(struct list_head *ws)
{
btrfs_put_workspace(&wsm, ws);
@@ -494,7 +489,6 @@ out:
const struct btrfs_compress_op btrfs_lzo_compress = {
.workspace_manager = &wsm,
- .get_workspace = lzo_get_workspace,
.put_workspace = lzo_put_workspace,
.alloc_workspace = lzo_alloc_workspace,
.free_workspace = lzo_free_workspace,