btrfs: compression: inline get_workspace
authorDavid Sterba <dsterba@suse.com>
Fri, 4 Oct 2019 00:36:16 +0000 (02:36 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 18 Nov 2019 11:46:58 +0000 (12:46 +0100)
commit6a0d12724bd2dd1c766769578e221ce1d10a4656
treede49c7bedeab33d6e807ee65ff63541d1a4d9361
parentd20f395f98959dee592cf05af0bec7ab5b185e5e
btrfs: compression: inline get_workspace

Majority of the callbacks is trivial, we don't gain anything by the
indirection, so replace them by a switch function.

ZLIB needs to adjust level in the callback and ZSTD workspace management
is complex, the rest is call to the helper.

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