Skip to content

Commit

Permalink
mm/damon/core.c: avoid unintentional filtering out of schemes
Browse files Browse the repository at this point in the history
The function '__damos_filter_out()' causes DAMON to always filter out
schemes whose filter type is anon or memcg if its matching value is set
to false.

This commit addresses the issue by ensuring that '__damos_filter_out()'
no longer applies to filters whose type is 'anon' or 'memcg'.

Link: https://lkml.kernel.org/r/1699594629-3816-1-git-send-email-hyeongtak.ji@gmail.com
Fixes: ab9bda0 ("mm/damon/core: introduce address range type damos filter")
Signed-off-by: Hyeongtak Ji <hyeongtak.ji@sk.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
Hyeongtak Ji authored and Andrew Morton committed Nov 15, 2023
1 parent 24948e3 commit 13b2a4b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/damon/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ static bool __damos_filter_out(struct damon_ctx *ctx, struct damon_target *t,
matched = true;
break;
default:
break;
return false;
}

return matched == filter->matching;
Expand Down

0 comments on commit 13b2a4b

Please sign in to comment.