mirror of
https://github.com/torvalds/linux.git
synced 2026-11-09 13:44:03 +01:00
mm/damon/reclaim: remove unnecessary damon_call() param validation
DAMON_RECLAIM 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-4-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
1fecdf1d56
commit
f306b0b41d
|
|
@ -271,8 +271,6 @@ static int damon_reclaim_commit_inputs_fn(void *arg)
|
|||
return damon_reclaim_apply_parameters();
|
||||
}
|
||||
|
||||
static bool damon_reclaim_damon_has_started;
|
||||
|
||||
static int damon_reclaim_commit_inputs_store(const char *val,
|
||||
const struct kernel_param *kp)
|
||||
{
|
||||
|
|
@ -293,10 +291,6 @@ static int damon_reclaim_commit_inputs_store(const char *val,
|
|||
if (!commit_inputs_request)
|
||||
return 0;
|
||||
|
||||
/* Skip damon_call() if ctx has not successfully started. */
|
||||
if (!damon_reclaim_damon_has_started)
|
||||
return -EINVAL;
|
||||
|
||||
err = damon_call(ctx, &control);
|
||||
|
||||
return err ? err : control.return_code;
|
||||
|
|
@ -343,8 +337,6 @@ static int damon_reclaim_turn(bool on)
|
|||
err = damon_start(&ctx, 1, true);
|
||||
if (err)
|
||||
return err;
|
||||
if (!damon_reclaim_damon_has_started)
|
||||
damon_reclaim_damon_has_started = true;
|
||||
return damon_call(ctx, &call_control);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user