From: Sheng Yong Date: Thu, 17 Nov 2022 15:10:54 +0000 (+0800) Subject: f2fs: set zstd compress level correctly X-Git-Tag: v6.0.16~436 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cca7746b6cc472cc1a5acbd0f701ea71cc53fa36;p=thirdparty%2Fkernel%2Fstable.git f2fs: set zstd compress level correctly [ Upstream commit 4ff23a6547b81ca22adb852dfe93ee5fc45328ac ] Fixes: cf30f6a5f0c6 ("lib: zstd: Add kernel-specific API") Signed-off-by: Sheng Yong Reviewed-by: Chao Yu Reviewed-by: Nick Terrell Signed-off-by: Jaegeuk Kim Signed-off-by: Sasha Levin --- diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c index 70e97075e535e..e70928e92b2cd 100644 --- a/fs/f2fs/compress.c +++ b/fs/f2fs/compress.c @@ -346,7 +346,7 @@ static int zstd_init_compress_ctx(struct compress_ctx *cc) if (!level) level = F2FS_ZSTD_DEFAULT_CLEVEL; - params = zstd_get_params(F2FS_ZSTD_DEFAULT_CLEVEL, cc->rlen); + params = zstd_get_params(level, cc->rlen); workspace_size = zstd_cstream_workspace_bound(¶ms.cParams); workspace = f2fs_kvmalloc(F2FS_I_SB(cc->inode),