Skip to content

Commit 7d390b5

Browse files
sjp38akpm00
authored andcommitted
mm/damon/core: fix ignored quota goals and filters of newly committed schemes
damon_commit_schemes() ignores quota goals and filters of the newly committed schemes. This makes users confused about the behaviors. Correctly handle those inputs. Link: https://lkml.kernel.org/r/20241222231222.85060-3-sj@kernel.org Fixes: 9cb3d0b ("mm/damon/core: implement DAMON context commit function") Signed-off-by: SeongJae Park <sj@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
1 parent 8debfc5 commit 7d390b5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mm/damon/core.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,11 @@ static int damon_commit_schemes(struct damon_ctx *dst, struct damon_ctx *src)
868868
NUMA_NO_NODE);
869869
if (!new_scheme)
870870
return -ENOMEM;
871+
err = damos_commit(new_scheme, src_scheme);
872+
if (err) {
873+
damon_destroy_scheme(new_scheme);
874+
return err;
875+
}
871876
damon_add_scheme(dst, new_scheme);
872877
}
873878
return 0;

0 commit comments

Comments
 (0)