]> git.ipfire.org Git - thirdparty/linux.git/commit
mm/damon/core: set damos_filter default allowance behavior based on installed filters
authorSeongJae Park <sj@kernel.org>
Tue, 4 Mar 2025 21:19:11 +0000 (13:19 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 17 Mar 2025 07:05:39 +0000 (00:05 -0700)
commit961df88e4688bf94cfa49d644e49b74d34806d3d
treeca52b9217a4324b0b90b30be99a84cddb20e533e
parentdd038b728c8a2a0e1a632b767a50f09f076dab79
mm/damon/core: set damos_filter default allowance behavior based on installed filters

Decide whether to allow or reject by default on core and opertions layer
handled filters evaluation stages.  It is decided as the opposite of the
last installed filter's behavior.  If there is no filter at all, allow by
default.  If there is any operations layer handled filters, core layer's
filtering stage sets allowing as the default behavior regardless of the
last filter of core layer-handling ones, since the last filter of core
layer handled filters in the case is not really the last filter of the
entire filtering stage.

Also, make the core layer's DAMOS filters handling stage uses the newly
set behavior field.

[sj@kernel.org: setup damos->{core,ops}_filters_default_reject for initial start]
Link: https://lkml.kernel.org/r/20250315222610.35245-1-sj@kernel.org
Link: https://lkml.kernel.org/r/20250304211913.53574-8-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/core.c