mirror of
https://github.com/torvalds/linux.git
synced 2026-11-09 13:44:03 +01:00
mm/damon/lru_sort: remove unnecessary damon_call() param validation
DAMON_LRU_SORT avoids passing NULL or unstarted damon_ctx to damon_call() with its own validation. The validation is no longer needed, because the DAMON core layer now handles the corner cases itself. Remove the unnecessary check. Link: https://lore.kernel.org/20260903010334.93622-5-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:
parent
f306b0b41d
commit
0e3846146f
|
|
@ -344,8 +344,6 @@ static int damon_lru_sort_commit_inputs_fn(void *arg)
|
|||
return damon_lru_sort_apply_parameters();
|
||||
}
|
||||
|
||||
static bool damon_lru_sort_damon_has_started;
|
||||
|
||||
static int damon_lru_sort_commit_inputs_store(const char *val,
|
||||
const struct kernel_param *kp)
|
||||
{
|
||||
|
|
@ -366,10 +364,6 @@ static int damon_lru_sort_commit_inputs_store(const char *val,
|
|||
if (!commit_inputs_request)
|
||||
return 0;
|
||||
|
||||
/* Skip damon_call() if ctx has not successfully started. */
|
||||
if (!damon_lru_sort_damon_has_started)
|
||||
return -EINVAL;
|
||||
|
||||
err = damon_call(ctx, &control);
|
||||
|
||||
return err ? err : control.return_code;
|
||||
|
|
@ -420,8 +414,6 @@ static int damon_lru_sort_turn(bool on)
|
|||
err = damon_start(&ctx, 1, true);
|
||||
if (err)
|
||||
return err;
|
||||
if (!damon_lru_sort_damon_has_started)
|
||||
damon_lru_sort_damon_has_started = true;
|
||||
return damon_call(ctx, &call_control);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user