summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 16:58:08 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-08 16:58:08 +0000
commit1121cef62750fbc3ec1b87f4fcf2cef0f05f23a9 (patch)
treeba8548f2df113c7da8a46563947536f455f9a1c0 /fs/f2fs/super.c
parentAdding debian version 6.1.76-1. (diff)
downloadlinux-1121cef62750fbc3ec1b87f4fcf2cef0f05f23a9.tar.xz
linux-1121cef62750fbc3ec1b87f4fcf2cef0f05f23a9.zip
Merging upstream version 6.1.82.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 3805162dc..0c0d0671f 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -628,7 +628,7 @@ static int f2fs_set_lz4hc_level(struct f2fs_sb_info *sbi, const char *str)
if (kstrtouint(str + 1, 10, &level))
return -EINVAL;
- if (level < LZ4HC_MIN_CLEVEL || level > LZ4HC_MAX_CLEVEL) {
+ if (!f2fs_is_compress_level_valid(COMPRESS_LZ4, level)) {
f2fs_info(sbi, "invalid lz4hc compress level: %d", level);
return -EINVAL;
}
@@ -666,7 +666,7 @@ static int f2fs_set_zstd_level(struct f2fs_sb_info *sbi, const char *str)
if (kstrtouint(str + 1, 10, &level))
return -EINVAL;
- if (level < zstd_min_clevel() || level > zstd_max_clevel()) {
+ if (!f2fs_is_compress_level_valid(COMPRESS_ZSTD, level)) {
f2fs_info(sbi, "invalid zstd compress level: %d", level);
return -EINVAL;
}