aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorLi Zefan <lizefan@huawei.com>2013-03-12 18:35:58 -0400
committerTejun Heo <tj@kernel.org>2013-03-12 18:35:58 -0400
commite7b2dcc52b0e2d598a469f01cc460ccdde6869f2 (patch)
treec716655a75a9f91de5f21f94fe53e96fbf680fe9 /kernel/cgroup.c
parentcfb5966bef85412dab9c93553db10b3e99ac32e8 (diff)
cgroup: remove cgroup_is_descendant()
It was used by ns cgroup, and ns cgroup was removed long ago. Signed-off-by: Li Zefan <lizefan@huawei.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 7a6c4c72ca55..f51443fd5f71 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -5035,34 +5035,6 @@ void cgroup_exit(struct task_struct *tsk, int run_callbacks)
5035 put_css_set_taskexit(cg); 5035 put_css_set_taskexit(cg);
5036} 5036}
5037 5037
5038/**
5039 * cgroup_is_descendant - see if @cgrp is a descendant of @task's cgrp
5040 * @cgrp: the cgroup in question
5041 * @task: the task in question
5042 *
5043 * See if @cgrp is a descendant of @task's cgroup in the appropriate
5044 * hierarchy.
5045 *
5046 * If we are sending in dummytop, then presumably we are creating
5047 * the top cgroup in the subsystem.
5048 *
5049 * Called only by the ns (nsproxy) cgroup.
5050 */
5051int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task)
5052{
5053 int ret;
5054 struct cgroup *target;
5055
5056 if (cgrp == dummytop)
5057 return 1;
5058
5059 target = task_cgroup_from_root(task, cgrp->root);
5060 while (cgrp != target && cgrp!= cgrp->top_cgroup)
5061 cgrp = cgrp->parent;
5062 ret = (cgrp == target);
5063 return ret;
5064}
5065
5066static void check_for_release(struct cgroup *cgrp) 5038static void check_for_release(struct cgroup *cgrp)
5067{ 5039{
5068 /* All of these checks rely on RCU to keep the cgroup 5040 /* All of these checks rely on RCU to keep the cgroup