mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-23 07:23:12 +02:00
f2fs: fix to check upper boundary for gc_no_zoned_gc_percent
[ Upstream commita919ae794a
] This patch adds missing upper boundary check while setting gc_no_zoned_gc_percent via sysfs. Fixes:9a481a1c16
("f2fs: create gc_no_zoned_gc_percent and gc_boost_zoned_gc_percent") Cc: Daeho Jeong <daehojeong@google.com> Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
54c4ee2593
commit
f03e756a57
|
@ -628,6 +628,13 @@ out:
|
|||
return count;
|
||||
}
|
||||
|
||||
if (!strcmp(a->attr.name, "gc_no_zoned_gc_percent")) {
|
||||
if (t > 100)
|
||||
return -EINVAL;
|
||||
*ui = (unsigned int)t;
|
||||
return count;
|
||||
}
|
||||
|
||||
if (!strcmp(a->attr.name, "gc_boost_zoned_gc_percent")) {
|
||||
if (t > 100)
|
||||
return -EINVAL;
|
||||
|
|
Loading…
Reference in New Issue
Block a user