Skip to content

Commit f9fa006

Browse files
sjp38gregkh
authored andcommitted
samples/damon/mtier: avoid starting DAMON before initialization
[ Upstream commit c62cff4 ] Commit 9643143 ("samples/damon/mtier: support boot time enable setup") is somehow incompletely applying the origin patch [1]. It is missing the part that avoids starting DAMON before module initialization. Probably a mistake during a merge has happened. Fix it by applying the missed part again. Link: https://lkml.kernel.org/r/20250909022238.2989-4-sj@kernel.org Link: https://lore.kernel.org/20250706193207.39810-4-sj@kernel.org [1] Fixes: 9643143 ("samples/damon/mtier: support boot time enable setup") Signed-off-by: SeongJae Park <sj@kernel.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 8f7dd19 commit f9fa006

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

samples/damon/mtier.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ static int damon_sample_mtier_enable_store(
166166
if (enabled == is_enabled)
167167
return 0;
168168

169+
if (!init_called)
170+
return 0;
171+
169172
if (enabled) {
170173
err = damon_sample_mtier_start();
171174
if (err)

0 commit comments

Comments
 (0)