]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
cgroup: make cgroup_is_threaded() and cgroup_is_thread_root() static
authorMiaohe Lin <linmiaohe@huawei.com>
Sat, 3 Jun 2023 07:13:04 +0000 (15:13 +0800)
committerTejun Heo <tj@kernel.org>
Mon, 5 Jun 2023 20:31:41 +0000 (10:31 -1000)
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>
kernel/cgroup/cgroup-internal.h
kernel/cgroup/cgroup.c

index 367b0a42ada909be6ee6b2b003463d14c3ab95f3..c56071f150f2ae74362f6a397c22687409372736 100644 (file)
@@ -220,8 +220,6 @@ static inline void get_css_set(struct css_set *cset)
 
 bool cgroup_ssid_enabled(int ssid);
 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 *task_cgroup_from_root(struct task_struct *task,
index f69e9a443ecc358fa0c9486163883ca198f07197..57f31b2344339230a6a8652fbc8146cc8e27d74c 100644 (file)
@@ -357,7 +357,7 @@ static bool cgroup_has_tasks(struct cgroup *cgrp)
        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;
 }
@@ -396,7 +396,7 @@ static bool cgroup_can_be_thread_root(struct cgroup *cgrp)
 }
 
 /* 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 */
        if (cgroup_is_threaded(cgrp))