f2fs: fix to check warm_data_age_threshold
authorYangtao Li <frank.li@vivo.com>
Tue, 17 Jan 2023 13:24:42 +0000 (21:24 +0800)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 31 Jan 2023 18:47:45 +0000 (10:47 -0800)
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 <frank.li@vivo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/sysfs.c

index e396851a6dd10085df65f72d23b051c47f293b94..3c6425f9ed0adc07c7a16c4efc3d2a463638a43a 100644 (file)
@@ -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;