summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/zstd.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-10-02 01:08:03 +0200
committerDavid Sterba <dsterba@suse.com>2019-11-18 12:46:57 +0100
commit2510307e6c78d1d9a59c85164cbff66f8a9f3fed (patch)
treefdcfdcf75fd6a9cbae2700c9ba38ae1c1597abee /fs/btrfs/zstd.c
parent2dba714390f1ff7a8a37cc8c3b374d71d3e84af7 (diff)
downloadlinux-2510307e6c78d1d9a59c85164cbff66f8a9f3fed.tar.bz2
btrfs: compression: inline cleanup_workspace_manager
Replace loop calling to all algos with a list of direct calls to the cleanup manager callback. When that becomes trivial it is replaced by direct 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/zstd.c')
-rw-r--r--fs/btrfs/zstd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/zstd.c b/fs/btrfs/zstd.c
index 8e7a804b05ee..f575ce77ea3d 100644
--- a/fs/btrfs/zstd.c
+++ b/fs/btrfs/zstd.c
@@ -194,7 +194,7 @@ void zstd_init_workspace_manager(void)
}
}
-static void zstd_cleanup_workspace_manager(void)
+void zstd_cleanup_workspace_manager(void)
{
struct workspace *workspace;
int i;
@@ -709,7 +709,6 @@ finish:
const struct btrfs_compress_op btrfs_zstd_compress = {
/* ZSTD uses own workspace manager */
.workspace_manager = NULL,
- .cleanup_workspace_manager = zstd_cleanup_workspace_manager,
.get_workspace = zstd_get_workspace,
.put_workspace = zstd_put_workspace,
.alloc_workspace = zstd_alloc_workspace,