btrfs: switch compression callbacks to direct calls
authorDavid Sterba <dsterba@suse.com>
Tue, 1 Oct 2019 22:06:15 +0000 (00:06 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 18 Nov 2019 11:46:57 +0000 (12:46 +0100)
commit1e4eb7465438e47cc3718a02d4326dd034f3c0da
tree35ba323e319d89f15c3c45133144fa23dd96cbae
parentc4bf665a3197554a696121d20f3bf11d084a6961
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>
fs/btrfs/compression.c
fs/btrfs/compression.h
fs/btrfs/lzo.c
fs/btrfs/zlib.c
fs/btrfs/zstd.c