]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mm/damon: simplify damon_ctx check in damon_sysfs_before_terminate
authorXin Hao <xhao@linux.alibaba.com>
Wed, 7 Sep 2022 08:41:16 +0000 (16:41 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 3 Oct 2022 21:03:03 +0000 (14:03 -0700)
commit61768a1b37c664faf028d925e6b7825768afcc00
tree5c01a6aea9dacdd6d4a3b63b9a7793e79245320c
parent36001cba4f728e7fa2a58bc69fece22eaeef5cca
mm/damon: simplify damon_ctx check in damon_sysfs_before_terminate

In damon_sysfs_before_terminate(), it needs to check whether ctx->ops.id
supports 'DAMON_OPS_VADDR' or 'DAMON_OPS_FVADDR', there we can use
damon_target_has_pid() instead.

Link: https://lkml.kernel.org/r/20220907084116.62053-1-xhao@linux.alibaba.com
Signed-off-by: Xin Hao <xhao@linux.alibaba.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/damon/sysfs.c