mm/damon/{dbgfs,sysfs}: move target_has_pid() from dbgfs to damon.h
authorSeongJae Park <sj@kernel.org>
Mon, 6 Jun 2022 18:23:06 +0000 (18:23 +0000)
committerakpm <akpm@linux-foundation.org>
Mon, 4 Jul 2022 01:08:38 +0000 (18:08 -0700)
commitc9e124e0382d83d458db204f929002ea98daa6a8
tree7c3f1f9a10a335ce423ff9706c8690968712cede
parent205498012513f9a1209d9335bf3766080c587a33
mm/damon/{dbgfs,sysfs}: move target_has_pid() from dbgfs to damon.h

The function for knowing if given monitoring context's targets will have
pid or not is defined and used in dbgfs only.  However, the logic is also
needed for sysfs.  This commit moves the code to damon.h and makes both
dbgfs and sysfs to use it.

Link: https://lkml.kernel.org/r/20220606182310.48781-3-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>
include/linux/damon.h
mm/damon/dbgfs.c
mm/damon/sysfs.c