linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/damon/core: Commit damos->target_nid
@ 2025-07-09  0:47 Bijan Tabatabai
  2025-07-09  2:47 ` SeongJae Park
  0 siblings, 1 reply; 2+ messages in thread
From: Bijan Tabatabai @ 2025-07-09  0:47 UTC (permalink / raw)
  To: linux-mm, damon, linux-kernel; +Cc: sj, akpm, Bijan Tabatabai, stable

From: Bijan Tabatabai <bijantabatab@micron.com>

When committing new scheme parameters from the sysfs, the target_nid
field of the damos struct would not be copied. This would result in the
target_nid field to retain its original value, despite being updated in
the sysfs interface.

This patch fixes this issue by copying target_nid in damos_commit().

Cc: stable@vger.kernel.org
Fixes: 83dc7bbaecae ("mm/damon/sysfs: use damon_commit_ctx()")
Signed-off-by: Bijan Tabatabai <bijantabatab@micron.com>
---
 mm/damon/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/mm/damon/core.c b/mm/damon/core.c
index 5357a18066b0..ab28ab5d08f6 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -978,6 +978,7 @@ static int damos_commit(struct damos *dst, struct damos *src)
 		return err;
 
 	dst->wmarks = src->wmarks;
+	dst->target_nid = src->target_nid;
 
 	err = damos_commit_filters(dst, src);
 	return err;
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mm/damon/core: Commit damos->target_nid
  2025-07-09  0:47 [PATCH] mm/damon/core: Commit damos->target_nid Bijan Tabatabai
@ 2025-07-09  2:47 ` SeongJae Park
  0 siblings, 0 replies; 2+ messages in thread
From: SeongJae Park @ 2025-07-09  2:47 UTC (permalink / raw)
  To: Bijan Tabatabai
  Cc: SeongJae Park, linux-mm, damon, linux-kernel, akpm,
	Bijan Tabatabai, stable

On Tue,  8 Jul 2025 19:47:29 -0500 Bijan Tabatabai <bijan311@gmail.com> wrote:

> From: Bijan Tabatabai <bijantabatab@micron.com>
> 
> When committing new scheme parameters from the sysfs, the target_nid
> field of the damos struct would not be copied. This would result in the
> target_nid field to retain its original value, despite being updated in
> the sysfs interface.
> 
> This patch fixes this issue by copying target_nid in damos_commit().

Thank you for fixing this, Bijan!
> 
> Cc: stable@vger.kernel.org
> Fixes: 83dc7bbaecae ("mm/damon/sysfs: use damon_commit_ctx()")
> Signed-off-by: Bijan Tabatabai <bijantabatab@micron.com>

Reviewed-by: SeongJae Park <sj@kernel.org>


Thanks,
SJ

[...]


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-07-09  2:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-09  0:47 [PATCH] mm/damon/core: Commit damos->target_nid Bijan Tabatabai
2025-07-09  2:47 ` SeongJae Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).