btrfs: switch compression callbacks to direct calls
The indirect calls bring some overhead due to spectre vulnerability mitigations. The number of cases is small and below the threshold (10-20) where indirect call would be better. 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:
@@ -420,9 +420,6 @@ const struct btrfs_compress_op btrfs_zlib_compress = {
|
||||
.put_workspace = zlib_put_workspace,
|
||||
.alloc_workspace = zlib_alloc_workspace,
|
||||
.free_workspace = zlib_free_workspace,
|
||||
.compress_pages = zlib_compress_pages,
|
||||
.decompress_bio = zlib_decompress_bio,
|
||||
.decompress = zlib_decompress,
|
||||
.max_level = 9,
|
||||
.default_level = BTRFS_ZLIB_DEFAULT_LEVEL,
|
||||
};
|
||||
|
Reference in New Issue
Block a user