mm/damon/reclaim: fix the timer always stays active
authorHailong Tu <tuhailong@gmail.com>
Fri, 29 Apr 2022 21:37:00 +0000 (14:37 -0700)
committerakpm <akpm@linux-foundation.org>
Fri, 29 Apr 2022 21:37:00 +0000 (14:37 -0700)
commit059342d1dd4e01d634184793fa3f8437e62afaa1
treecb42489cf71660c09be53b129fe572a008979bcb
parentcef4493f1aaacf797bc4ab0565682ab1143bf580
mm/damon/reclaim: fix the timer always stays active

The timer stays active even if the reclaim mechanism is never enabled.  It
is unnecessary overhead can be completely avoided by using
module_param_cb() for enabled flag.

Link: https://lkml.kernel.org/r/20220421125910.1052459-1-tuhailong@gmail.com
Signed-off-by: Hailong Tu <tuhailong@gmail.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/reclaim.c