summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/compression.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2019-10-04 03:09:55 +0200
committerDavid Sterba <dsterba@suse.com>2019-11-18 12:46:59 +0100
commit0cf252131361cdeebb7dfc88dd8ec825fff0956a (patch)
tree01eef762cff123abc75fd68054e9c6db0897106f /fs/btrfs/compression.c
parent1e002351605db4f2fc4114cbb973d5aead72d006 (diff)
btrfs: compression: remove ops pointer from workspace_manager
We can infer the ops from the type that is now passed to all functions that would need it, this makes workspace_manager::ops redundant and can be removed. 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/compression.c')
-rw-r--r--fs/btrfs/compression.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c
index b2342f99b093..53aee0db9d71 100644
--- a/fs/btrfs/compression.c
+++ b/fs/btrfs/compression.c
@@ -956,12 +956,10 @@ static void free_workspace(int type, struct list_head *ws)
static void btrfs_init_workspace_manager(int type)
{
- const struct btrfs_compress_op *ops = btrfs_compress_op[type];
- struct workspace_manager *wsm = ops->workspace_manager;
+ struct workspace_manager *wsm;
struct list_head *workspace;
- wsm->ops = ops;
-
+ wsm = btrfs_compress_op[type]->workspace_manager;
INIT_LIST_HEAD(&wsm->idle_ws);
spin_lock_init(&wsm->ws_lock);
atomic_set(&wsm->total_ws, 0);