diff options
author | David Sterba <dsterba@suse.com> | 2019-10-04 01:40:58 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-11-18 12:46:57 +0100 |
commit | 2dba714390f1ff7a8a37cc8c3b374d71d3e84af7 (patch) | |
tree | d8c07872abeac80b5bf0b68c7380f976a25b9747 /fs/btrfs/compression.c | |
parent | btrfs: compression: inline init_workspace_manager (diff) | |
download | linux-2dba714390f1ff7a8a37cc8c3b374d71d3e84af7.tar.xz linux-2dba714390f1ff7a8a37cc8c3b374d71d3e84af7.zip |
btrfs: compression: let workspace manager cleanup take only the type
With the access to the workspace structures, we can look it up together
with the compression ops inside the workspace manager cleanup 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/compression.c')
-rw-r--r-- | fs/btrfs/compression.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 61b9cf095ee5..6c4dc62b9ab0 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -863,7 +863,7 @@ static struct workspace_manager heuristic_wsm; static void heuristic_cleanup_workspace_manager(void) { - btrfs_cleanup_workspace_manager(&heuristic_wsm); + btrfs_cleanup_workspace_manager(BTRFS_COMPRESS_NONE); } static struct list_head *heuristic_get_workspace(unsigned int level) @@ -960,10 +960,12 @@ static void btrfs_init_workspace_manager(int type) } } -void btrfs_cleanup_workspace_manager(struct workspace_manager *wsman) +void btrfs_cleanup_workspace_manager(int type) { + struct workspace_manager *wsman; struct list_head *ws; + wsman = btrfs_compress_op[type]->workspace_manager; while (!list_empty(&wsman->idle_ws)) { ws = wsman->idle_ws.next; list_del(ws); |