diff options
| author | SJ Park <sj@kernel.org> | 2026-09-02 18:07:21 -0700 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-10-08 22:54:35 -0700 |
| commit | f305464862ec47d4e1fbc526354f61fc1e4d9e55 (patch) | |
| tree | e4989182a56ffb732fe13ce90d1d9339a1cac2c8 /samples | |
| parent | dd07497616f2bbddd251828f2f36304500b6eb00 (diff) | |
Revert "samples/damon/mtier: error out for zero quota goal target values"
This reverts commit a16fd3ad9d89b05475864da97327870464611736.
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>
Diffstat (limited to 'samples')
| -rw-r--r-- | samples/damon/mtier.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/samples/damon/mtier.c b/samples/damon/mtier.c index bea45c87cc9b..27dc88bdf7a0 100644 --- a/samples/damon/mtier.c +++ b/samples/damon/mtier.c @@ -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, |
