Commit 9b13a866 authored by Yangtao Li's avatar Yangtao Li Committed by Jaegeuk Kim
Browse files

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: default avatarYangtao Li <frank.li@vivo.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent b1c5ef26
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -689,7 +689,7 @@ static ssize_t __sbi_store(struct f2fs_attr *a,
	}

	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;