From: Yangtao Li Date: Tue, 17 Jan 2023 13:24:42 +0000 (+0800) Subject: f2fs: fix to check warm_data_age_threshold X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=9b13a8662ea61430005d3de3fc1d73e383b1ce5a;p=linux.git f2fs: fix to check warm_data_age_threshold hot_data_age_threshold is a non-zero positive number, and condition 2 includes condition 1, so there is no need to additionally judge whether t is 0. And let's remove it. Signed-off-by: Yangtao Li Signed-off-by: Jaegeuk Kim --- diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c index e396851a6dd10..3c6425f9ed0ad 100644 --- a/fs/f2fs/sysfs.c +++ b/fs/f2fs/sysfs.c @@ -689,7 +689,7 @@ out: } if (!strcmp(a->attr.name, "warm_data_age_threshold")) { - if (t == 0 || t <= sbi->hot_data_age_threshold) + if (t <= sbi->hot_data_age_threshold) return -EINVAL; if (t == *ui) return count;