mm/damon/reclaim: fix typo in damon_reclaim_timer_fn()
Subsystems (3)
PATCH 1/1 mm/damon/reclaim: fix typo in damon_reclaim_timer_fn()
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 '=='.
--- mm/damon/reclaim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mm/damon/reclaim.c +1 -1
@@ -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); }
Signature · 1 line
2.55.0
Greg KH
maintainerQuoted 10 lines · Liew Rui Yan
Commit
2f54908fae211("mm/damon/reclaim: detect and use fresh enabled andkdamond_pidvalues") introduced a typo indamon_reclaim_timer_fn()where '!=' was used instead of '==' (unlikedamon_lru_sort_timer_fn()). This causeddamon_reclaimto 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")
Why is this a stable-only patch? Did something go wrong with the backport of this commit that is not in the upstream version?
thanks,
greg k-h
Hi Greg,
Quoted 2 lines · Greg KH
Why is this a stable-only patch? Did something go wrong with the backport of this commit that is not in the upstream version?
Sorry for the confusion!
This is a stable-only patch because this specific function was removed in mainline starting from v6.2.
Therefore, this bug only affects v6.1.176 and v6.1.177 stable branches. Mainline does not have this function anymore.
$ git tag --contains 2f54908fae21
v6.1.176
v6.1.177Let me know if you want me to resend with this explanation explicitly noted in the commit message.
Best regards,
Rui Yan
Greg KH
maintainerQuoted 15 lines · Liew Rui Yan
Hi Greg,
Quoted 2 lines · Greg KH
Why is this a stable-only patch? Did something go wrong with the backport of this commit that is not in the upstream version?
Sorry for the confusion!
This is a stable-only patch because this specific function was removed in mainline starting from v6.2.
Therefore, this bug only affects v6.1.176 and v6.1.177 stable branches. Mainline does not have this function anymore.
Quoted 6 lines
$ git tag --contains 2f54908fae21 v6.1.176 v6.1.177Let me know if you want me to resend with this explanation explicitly noted in the commit message.
Why can't we just take the same commits that are upstream that prevent this issue from happening?
thanks,
greg k-h
SJ Park
maintainerQuoted 7 lines · On Mon, 20 Jul 2026 13:53:10 +0200 Greg KH <[email protected]> wrote:
Quoted 6 lines · Liew Rui Yan
Hi Greg,
Quoted 2 lines · Greg KH
Why is this a stable-only patch? Did something go wrong with the backport of this commit that is not in the upstream version?
You are correct. The typo was introduced by a mistake during the porting. The upstream commit (64a140afa5ed) doesn't have the typo. This patch fixes the typo.
Quoted 5 lines
Quoted 5 lines
Sorry for the confusion!
This is a stable-only patch because this specific function was removed in mainline starting from v6.2.
It is true the function is removed in the mainline. But that's not the reason why we need this patch applied to only 6.1. The reason is that the porting introduced a bug.
Quoted 8 lines
Quoted 8 lines
Therefore, this bug only affects v6.1.176 and v6.1.177 stable branches. Mainline does not have this function anymore.
$ git tag --contains 2f54908fae21 v6.1.176 v6.1.177
Quoted 5 lines
Quoted 2 lines
Let me know if you want me to resend with this explanation explicitly noted in the commit message.
Why can't we just take the same commits that are upstream that prevent this issue from happening?
We can't do so because the typo is only in the stable kernel.
Thanks,
SJ
[...]
Quoted 8 lines · On Mon, 20 Jul 2026 17:47:08 +0800 Liew Rui Yan <[email protected]>…
Commit
2f54908fae211("mm/damon/reclaim: detect and use fresh enabled andkdamond_pidvalues") introduced a typo indamon_reclaim_timer_fn()where '!=' was used instead of '==' (unlikedamon_lru_sort_timer_fn()). This causeddamon_reclaimto return early during the delayed work, breaking early boot parameter configuration like 'damon_reclaim.enabled=Y'.Fix this by changing '!=' to '=='.
Thank you for quickly fixing this!
Quoted 4 lines
Fixes 2f54908fae21 ("mm/damon/reclaim: detect and use fresh enabled and kdamond_pid values")Cc <[email protected]> # 6.1.xReported-by Yikai Zhao <[email protected]>
Quoted 1 line
Signed-off-by Liew Rui Yan <[email protected]>
Thanks,
SJ
[...]
Quoted 3 lines
Commit
2f54908fae211("mm/damon/reclaim: detect and use fresh enabled andkdamond_pidvalues") introduced a typo indamon_reclaim_timer_fn()where '!=' was used instead of '==' (unlikedamon_lru_sort_timer_fn()).
Queued for 6.1, thanks.
Signature · 2 lines
Thanks, Sasha