erofs: simplify compression configuration parser
authorGao Xiang <hsiangkao@linux.alibaba.com>
Sun, 22 Oct 2023 13:09:57 +0000 (21:09 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:57 +0000 (15:35 -0800)
commit586814ed68f7cb478dc8e782364f2b2bdea0f76c
treefa1e07cfe5d316d37a8b80b073bdd472d454a2e0
parentd2e919b6e66ba03a5d79f8483ee4281cf17f9a32
erofs: simplify compression configuration parser

[ Upstream commit efb4fb02cef3ab410b603c8f0e1c67f61d55f542 ]

Move erofs_load_compr_cfgs() into decompressor.c as well as introduce
a callback instead of a hard-coded switch for each algorithm for
simplicity.

Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20231022130957.11398-1-xiang@kernel.org
Stable-dep-of: 118a8cf504d7 ("erofs: fix inconsistent per-file compression format")
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/erofs/compress.h
fs/erofs/decompressor.c
fs/erofs/decompressor_deflate.c
fs/erofs/decompressor_lzma.c
fs/erofs/internal.h
fs/erofs/super.c