linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Bijan Tabatabai <bijan311@gmail.com>
To: linux-mm@kvack.org, damon@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: sj@kernel.org, akpm@linux-foundation.org,
	Bijan Tabatabai <bijantabatab@micron.com>,
	stable@vger.kernel.org
Subject: [PATCH] mm/damon/core: Commit damos->target_nid
Date: Tue,  8 Jul 2025 19:47:29 -0500	[thread overview]
Message-ID: <20250709004729.17252-1-bijan311@gmail.com> (raw)

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



             reply	other threads:[~2025-07-09  0:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-09  0:47 Bijan Tabatabai [this message]
2025-07-09  2:47 ` [PATCH] mm/damon/core: Commit damos->target_nid SeongJae Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250709004729.17252-1-bijan311@gmail.com \
    --to=bijan311@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bijantabatab@micron.com \
    --cc=damon@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sj@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).