All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm/damon/reclaim: fix typo in damon_reclaim_timer_fn()
@ 2026-07-20  9:47 Liew Rui Yan
  2026-07-20  9:59 ` Greg KH
  2026-07-20 15:38 ` SJ Park
  0 siblings, 2 replies; 6+ messages in thread
From: Liew Rui Yan @ 2026-07-20  9:47 UTC (permalink / raw)
  To: SJ Park; +Cc: damon, linux-mm, Liew Rui Yan, stable, Yikai Zhao

Commit 2f54908fae211 ("mm/damon/reclaim: detect and use fresh enabled
and kdamond_pid values") introduced a typo in damon_reclaim_timer_fn()
where '!=' was used instead of '==' (unlike damon_lru_sort_timer_fn()).
This caused damon_reclaim to return early during the delayed work,
breaking early boot parameter configuration like
'damon_reclaim.enabled=Y'.

Fix this by changing '!=' to '=='.

Fixes: 2f54908fae21 ("mm/damon/reclaim: detect and use fresh enabled and kdamond_pid values")
Cc: <stable@vger.kernel.org> # 6.1.x
Reported-by: Yikai Zhao <yikai@z1k.dev>
Signed-off-by: Liew Rui Yan <aethernet65535@gmail.com>
---
 mm/damon/reclaim.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c
index 016cd8d83ca9..bb4b705d842c 100644
--- a/mm/damon/reclaim.c
+++ b/mm/damon/reclaim.c
@@ -198,7 +198,7 @@ static void damon_reclaim_timer_fn(struct work_struct *work)
 	bool now_enabled;
 
 	now_enabled = enabled;
-	if (damon_reclaim_enabled() != now_enabled)
+	if (damon_reclaim_enabled() == now_enabled)
 		return;
 	damon_reclaim_turn(now_enabled);
 }
-- 
2.55.0


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

end of thread, other threads:[~2026-07-20 15:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-20  9:47 [PATCH] mm/damon/reclaim: fix typo in damon_reclaim_timer_fn() Liew Rui Yan
2026-07-20  9:59 ` Greg KH
2026-07-20 11:02   ` Liew Rui Yan
2026-07-20 11:53     ` Greg KH
2026-07-20 15:33       ` SJ Park
2026-07-20 15:38 ` SJ Park

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.