aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorLi Zefan <lizefan@huawei.com>2013-03-12 15:35:58 -0700
committerTejun Heo <tj@kernel.org>2013-03-12 15:35:58 -0700
commite7b2dcc52b0e2d598a469f01cc460ccdde6869f2 (patch)
treec716655a75a9f91de5f21f94fe53e96fbf680fe9 /kernel
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')
-rw-r--r--kernel/cgroup.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 7a6c4c72ca5..f51443fd5f7 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -5035,34 +5035,6 @@ void cgroup_exit(struct task_struct *tsk, int run_callbacks)
put_css_set_taskexit(cg);
}
-/**
- * cgroup_is_descendant - see if @cgrp is a descendant of @task's cgrp
- * @cgrp: the cgroup in question
- * @task: the task in question
- *
- * See if @cgrp is a descendant of @task's cgroup in the appropriate
- * hierarchy.
- *
- * If we are sending in dummytop, then presumably we are creating
- * the top cgroup in the subsystem.
- *
- * Called only by the ns (nsproxy) cgroup.
- */
-int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task)
-{
- int ret;
- struct cgroup *target;
-
- if (cgrp == dummytop)
- return 1;
-
- target = task_cgroup_from_root(task, cgrp->root);
- while (cgrp != target && cgrp!= cgrp->top_cgroup)
- cgrp = cgrp->parent;
- ret = (cgrp == target);
- return ret;
-}
-
static void check_for_release(struct cgroup *cgrp)
{
/* All of these checks rely on RCU to keep the cgroup