summaryrefslogtreecommitdiffstats
path: root/fs/f2fs
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-01-17 21:24:42 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2023-01-31 10:47:45 -0800
commit9b13a8662ea61430005d3de3fc1d73e383b1ce5a (patch)
tree420e740c34bae5817152ed099931946083f2cfc8 /fs/f2fs
parentb1c5ef26e4e80277641afcfedffe598c3023c095 (diff)
downloadlinux-9b13a8662ea61430005d3de3fc1d73e383b1ce5a.tar.gz
linux-9b13a8662ea61430005d3de3fc1d73e383b1ce5a.tar.bz2
linux-9b13a8662ea61430005d3de3fc1d73e383b1ce5a.zip
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 <frank.li@vivo.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs')
-rw-r--r--fs/f2fs/sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/sysfs.c b/fs/f2fs/sysfs.c
index e396851a6dd1..3c6425f9ed0a 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;