btrfs: compression: inline free_workspace

Replace indirect calls to free_workspace by switch and calls to the
specific callbacks. This is mainly to get rid of the indirection due to
spectre vulnerability mitigations.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba
2019-10-04 02:57:22 +02:00
parent a3bbd2a9ee
commit 1e00235160
5 changed files with 18 additions and 8 deletions

View File

@@ -400,7 +400,6 @@ next:
const struct btrfs_compress_op btrfs_zlib_compress = {
.workspace_manager = &wsm,
.free_workspace = zlib_free_workspace,
.max_level = 9,
.default_level = BTRFS_ZLIB_DEFAULT_LEVEL,
};