btrfs: compression: replace set_level callbacks by a common helper
authorDavid Sterba <dsterba@suse.com>
Fri, 9 Aug 2019 14:49:06 +0000 (16:49 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 9 Sep 2019 12:59:11 +0000 (14:59 +0200)
commitb0c1fe1eaf5eea10e8d577545298b6d5f9f7ff38
tree8d487a078a47357a06992bc8008293fb2bd35c26
parente18333a7cb97d838c09802092fcecd3269363ecb
btrfs: compression: replace set_level callbacks by a common helper

The set_level callbacks do not do anything special and can be replaced
by a helper that uses the levels defined in the tables.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Anand Jain <anand.jain@oracle.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