mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 11:03:07 -04:00
mm/damon/core: remove start, end check in damon_set_region_system_rams()
damon_set_region_system_rams() validates user inputs to avoid creating a negative size region. But DAMON core avoids zero size, too. The check is incomplete. The complete check is done inside damon_set_regions(), which is eventually called from damon_set_region_system_rams_default(). Drop the incomplete and unnecessary check. Link: https://lore.kernel.org/20260705155600.96555-8-sj@kernel.org Signed-off-by: SJ Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
@@ -3846,9 +3846,6 @@ int damon_set_region_system_rams_default(struct damon_target *t,
|
||||
{
|
||||
struct damon_addr_range addr_range;
|
||||
|
||||
if (*start > *end)
|
||||
return -EINVAL;
|
||||
|
||||
if (!*start && !*end &&
|
||||
!damon_find_system_rams_range(start, end, addr_unit))
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user