From 55e7eb53ea9e706291ead5ae443d6e1e1dbeb99c Mon Sep 17 00:00:00 2001 From: Li Zefan Date: Tue, 12 Mar 2013 15:35:58 -0700 Subject: [PATCH] --- yaml --- r: 365567 b: refs/heads/master c: e7b2dcc52b0e2d598a469f01cc460ccdde6869f2 h: refs/heads/master i: 365565: f5d9e3859a603b04f03b30f5bf3a4abacbff2132 365563: ce5750075a62130d3a154e0105332607ceb49f56 365559: b79c7acea50904ae0021408fdaca771ce99b0bf5 365551: f5c58defd3eb4fb40206c6fdf5adc2200ec2c03c 365535: 2dea5cae251f64d68ee8afdd4e1e742b7781353f 365503: 6d2c682f982b2bdc5270c19d7e7d78015deb0fba 365439: 1317529c9c19485b3aa0db74e689f98985fb35e9 365311: 6535af670fc31a4200fdb19a4b6194cec0a75dc1 365055: 12caa9c541f424bd016cc88cfbd13c3dc97e7586 364543: 0e4ad2a9b4f550caa3691e3c20af2d249b6a3d04 v: v3 --- [refs] | 2 +- trunk/include/linux/cgroup.h | 3 --- trunk/kernel/cgroup.c | 28 ---------------------------- 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/[refs] b/[refs] index 1354e03ea77c..dbcffe023250 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: cfb5966bef85412dab9c93553db10b3e99ac32e8 +refs/heads/master: e7b2dcc52b0e2d598a469f01cc460ccdde6869f2 diff --git a/trunk/include/linux/cgroup.h b/trunk/include/linux/cgroup.h index 5f76829dd75e..7e818a3ef60a 100644 --- a/trunk/include/linux/cgroup.h +++ b/trunk/include/linux/cgroup.h @@ -448,9 +448,6 @@ int cgroup_path(const struct cgroup *cgrp, char *buf, int buflen); int cgroup_task_count(const struct cgroup *cgrp); -/* Return true if cgrp is a descendant of the task's cgroup */ -int cgroup_is_descendant(const struct cgroup *cgrp, struct task_struct *task); - /* * Control Group taskset, used to pass around set of tasks to cgroup_subsys * methods. diff --git a/trunk/kernel/cgroup.c b/trunk/kernel/cgroup.c index 7a6c4c72ca55..f51443fd5f71 100644 --- a/trunk/kernel/cgroup.c +++ b/trunk/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