summaryrefslogtreecommitdiffstats
path: root/mm/damon
diff options
context:
space:
mode:
authorChangbin Du <changbin.du@gmail.com>2021-11-05 21:48:27 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2021-11-06 21:30:46 +0100
commit658f9ae761b5965893727dd4edcdad56e5a439bb (patch)
tree7c4e4e8cb93b9ee98e04696d3ba219b5698bfdf3 /mm/damon
parentmm/damon: fix a few spelling mistakes in comments and a pr_debug message (diff)
downloadlinux-658f9ae761b5965893727dd4edcdad56e5a439bb.tar.xz
linux-658f9ae761b5965893727dd4edcdad56e5a439bb.zip
mm/damon: remove return value from before_terminate callback
Since the return value of 'before_terminate' callback is never used, we make it have no return value. Link: https://lkml.kernel.org/r/20211029005023.8895-1-changbin.du@gmail.com Signed-off-by: Changbin Du <changbin.du@gmail.com> Reviewed-by: SeongJae Park <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/damon')
-rw-r--r--mm/damon/dbgfs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mm/damon/dbgfs.c b/mm/damon/dbgfs.c
index befb27a29aab..eccc14b34901 100644
--- a/mm/damon/dbgfs.c
+++ b/mm/damon/dbgfs.c
@@ -645,18 +645,17 @@ static void dbgfs_fill_ctx_dir(struct dentry *dir, struct damon_ctx *ctx)
debugfs_create_file(file_names[i], 0600, dir, ctx, fops[i]);
}
-static int dbgfs_before_terminate(struct damon_ctx *ctx)
+static void dbgfs_before_terminate(struct damon_ctx *ctx)
{
struct damon_target *t, *next;
if (!targetid_is_pid(ctx))
- return 0;
+ return;
damon_for_each_target_safe(t, next, ctx) {
put_pid((struct pid *)t->id);
damon_destroy_target(t);
}
- return 0;
}
static struct damon_ctx *dbgfs_new_ctx(void)