cgroup_rstat_flush_irqsafe() has no users, remove it. cgroup_rstat_flush_hold() and cgroup_rstat_flush_release() are only used within this file. Make it static. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> --- include/linux/cgroup.h | 3 --- kernel/cgroup/rstat.c | 19 ++----------------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h index f6b048902d6c5..2d1cb3f534ce1 100644 --- a/include/linux/cgroup.h +++ b/include/linux/cgroup.h @@ -749,9 +749,6 @@ static inline void cgroup_path_from_kernfs_id(const union kernfs_node_id *id, */ void cgroup_rstat_updated(struct cgroup *cgrp, int cpu); void cgroup_rstat_flush(struct cgroup *cgrp); -void cgroup_rstat_flush_irqsafe(struct cgroup *cgrp); -void cgroup_rstat_flush_hold(struct cgroup *cgrp); -void cgroup_rstat_flush_release(void); /* * Basic resource stats. diff --git a/kernel/cgroup/rstat.c b/kernel/cgroup/rstat.c index 72ba0ec4ae209..22e83497362ff 100644 --- a/kernel/cgroup/rstat.c +++ b/kernel/cgroup/rstat.c @@ -200,21 +200,6 @@ void cgroup_rstat_flush(struct cgroup *cgrp) spin_unlock_irq(&cgroup_rstat_lock); } -/** - * cgroup_rstat_flush_irqsafe - irqsafe version of cgroup_rstat_flush() - * @cgrp: target cgroup - * - * This function can be called from any context. - */ -void cgroup_rstat_flush_irqsafe(struct cgroup *cgrp) -{ - unsigned long flags; - - spin_lock_irqsave(&cgroup_rstat_lock, flags); - cgroup_rstat_flush_locked(cgrp, false); - spin_unlock_irqrestore(&cgroup_rstat_lock, flags); -} - /** * cgroup_rstat_flush_begin - flush stats in @cgrp's subtree and hold * @cgrp: target cgroup @@ -224,7 +209,7 @@ void cgroup_rstat_flush_irqsafe(struct cgroup *cgrp) * * This function may block. */ -void cgroup_rstat_flush_hold(struct cgroup *cgrp) +static void cgroup_rstat_flush_hold(struct cgroup *cgrp) __acquires(&cgroup_rstat_lock) { might_sleep(); @@ -235,7 +220,7 @@ void cgroup_rstat_flush_hold(struct cgroup *cgrp) /** * cgroup_rstat_flush_release - release cgroup_rstat_flush_hold() */ -void cgroup_rstat_flush_release(void) +static void cgroup_rstat_flush_release(void) __releases(&cgroup_rstat_lock) { spin_unlock_irq(&cgroup_rstat_lock); -- 2.23.0.rc1