mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
Revert "samples/damon/mtier: error out for zero quota goal target values"
This reverts commit a16fd3ad9d.
The commit was made to avoid zero damos quota goal target value, because
it can trigger division-by-zero. Now the core layer handles the corner
case. It returns an error for any attempt setting the aero target_value.
The corner case handling in DAMON_SAMPLE_MTIER is hence no more needed.
Remove it.
Link: https://lore.kernel.org/20260903010722.94244-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
dd07497616
commit
f305464862
|
|
@ -161,9 +161,6 @@ static struct damon_ctx *damon_sample_mtier_build_ctx(bool promote)
|
|||
if (!scheme)
|
||||
goto free_out;
|
||||
damon_set_schemes(ctx, &scheme, 1);
|
||||
/* zero target value causes division by zero in damos_quota_store() */
|
||||
if (!node0_mem_used_bp || !node0_mem_free_bp)
|
||||
goto free_out;
|
||||
quota_goal = damos_new_quota_goal(
|
||||
promote ? DAMOS_QUOTA_NODE_MEM_USED_BP :
|
||||
DAMOS_QUOTA_NODE_MEM_FREE_BP,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user