cgroup: make cgroup_is_threaded() and cgroup_is_thread_root() static

They're only called inside cgroup.c. Make them static.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Miaohe Lin
2023-06-03 15:13:04 +08:00
committed by Tejun Heo
parent c20d4d889f
commit 0dad9b072b
2 changed files with 2 additions and 4 deletions

View File

@@ -220,8 +220,6 @@ static inline void get_css_set(struct css_set *cset)
bool cgroup_ssid_enabled(int ssid); bool cgroup_ssid_enabled(int ssid);
bool cgroup_on_dfl(const struct cgroup *cgrp); bool cgroup_on_dfl(const struct cgroup *cgrp);
bool cgroup_is_thread_root(struct cgroup *cgrp);
bool cgroup_is_threaded(struct cgroup *cgrp);
struct cgroup_root *cgroup_root_from_kf(struct kernfs_root *kf_root); struct cgroup_root *cgroup_root_from_kf(struct kernfs_root *kf_root);
struct cgroup *task_cgroup_from_root(struct task_struct *task, struct cgroup *task_cgroup_from_root(struct task_struct *task,

View File

@@ -357,7 +357,7 @@ static bool cgroup_has_tasks(struct cgroup *cgrp)
return cgrp->nr_populated_csets; return cgrp->nr_populated_csets;
} }
bool cgroup_is_threaded(struct cgroup *cgrp) static bool cgroup_is_threaded(struct cgroup *cgrp)
{ {
return cgrp->dom_cgrp != cgrp; return cgrp->dom_cgrp != cgrp;
} }
@@ -396,7 +396,7 @@ static bool cgroup_can_be_thread_root(struct cgroup *cgrp)
} }
/* is @cgrp root of a threaded subtree? */ /* is @cgrp root of a threaded subtree? */
bool cgroup_is_thread_root(struct cgroup *cgrp) static bool cgroup_is_thread_root(struct cgroup *cgrp)
{ {
/* thread root should be a domain */ /* thread root should be a domain */
if (cgroup_is_threaded(cgrp)) if (cgroup_is_threaded(cgrp))