diff options
| author | Cheng-Han Wu <hank20010209@gmail.com> | 2026-08-31 07:57:22 -0700 |
|---|---|---|
| committer | Andrew Morton <akpm@linux-foundation.org> | 2026-09-29 23:11:45 -0700 |
| commit | 32af2923fcdfd9dc881cfa9e48f41e032fecd818 (patch) | |
| tree | 67a3998f9b4f4b9b0bf38d584de295fc417dca53 | |
| parent | 34bd9d753db0a99a9f827f226ca6906c23282639 (diff) | |
| download | linux-next-32af2923fcdfd9dc881cfa9e48f41e032fecd818.tar.gz linux-next-32af2923fcdfd9dc881cfa9e48f41e032fecd818.zip | |
mm/damon/core: remove unused damon_nr_running_ctxs()
damon_nr_running_ctxs() has had no in-tree users since commit 5ec4333b1967
("mm/damon: remove DAMON debugfs interface") removed all of its callers.
Remove the unused declaration and definition.
Link: https://lore.kernel.org/20260831145724.82387-3-sj@kernel.org
Signed-off-by: Cheng-Han Wu <hank20010209@gmail.com>
Signed-off-by: SJ Park <sj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: SJ Park <sj@kernel.org>
| -rw-r--r-- | include/linux/damon.h | 1 | ||||
| -rw-r--r-- | mm/damon/core.c | 14 |
2 files changed, 0 insertions, 15 deletions
diff --git a/include/linux/damon.h b/include/linux/damon.h index 89a41dea1d23..6993dca0f355 100644 --- a/include/linux/damon.h +++ b/include/linux/damon.h @@ -1065,7 +1065,6 @@ int damon_set_attrs(struct damon_ctx *ctx, struct damon_attrs *attrs); void damon_set_schemes(struct damon_ctx *ctx, struct damos **schemes, ssize_t nr_schemes); int damon_commit_ctx(struct damon_ctx *old_ctx, struct damon_ctx *new_ctx); -int damon_nr_running_ctxs(void); bool damon_is_registered_ops(enum damon_ops_id id); int damon_register_ops(struct damon_operations *ops); int damon_select_ops(struct damon_ctx *ctx, enum damon_ops_id id); diff --git a/mm/damon/core.c b/mm/damon/core.c index dc772ceae26f..d832a527bcf6 100644 --- a/mm/damon/core.c +++ b/mm/damon/core.c @@ -1847,20 +1847,6 @@ out: return err; } -/** - * damon_nr_running_ctxs() - Return number of currently running contexts. - */ -int damon_nr_running_ctxs(void) -{ - int nr_ctxs; - - mutex_lock(&damon_lock); - nr_ctxs = nr_running_ctxs; - mutex_unlock(&damon_lock); - - return nr_ctxs; -} - /* Returns the size upper limit for each monitoring region */ static unsigned long damon_region_sz_limit(struct damon_ctx *ctx) { |
