Skip to content

Commit c62cff4

Browse files
sjp38akpm00
authored andcommitted
samples/damon/mtier: avoid starting DAMON before initialization
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/[email protected] Link: https://lore.kernel.org/[email protected] [1] Fixes: 9643143 ("samples/damon/mtier: support boot time enable setup") Signed-off-by: SeongJae Park <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent e6b733c commit c62cff4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

samples/damon/mtier.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ static int damon_sample_mtier_enable_store(
208208
if (enabled == is_enabled)
209209
return 0;
210210

211+
if (!init_called)
212+
return 0;
213+
211214
if (enabled) {
212215
err = damon_sample_mtier_start();
213216
if (err)

0 commit comments

Comments
 (0)