aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-11-19 12:02:12 -0500
committerTejun Heo <tj@kernel.org>2012-11-19 12:02:12 -0500
commit0a950f65e1e64f4e82b4b5507773848ea88bcb8e (patch)
tree90106ea13abc3cfe9226dc0c7628ccad136f92b4 /include/linux/cgroup.h
parent033fa1c5f5f73833598a0beb022c0048fb769dad (diff)
cgroup: add cgroup->id
With the introduction of generic cgroup hierarchy iterators, css_id is being phased out. It was unnecessarily complex, id'ing the wrong thing (cgroups need IDs, not CSSes) and has other oddities like not being available at ->css_alloc(). This patch adds cgroup->id, which is a simple per-hierarchy ida-allocated ID which is assigned before ->css_alloc() and released after ->css_free(). Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
Diffstat (limited to 'include/linux/cgroup.h')
-rw-r--r--include/linux/cgroup.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index c798997e5011..82cf9e6fc77b 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -159,6 +159,8 @@ struct cgroup {
159 */ 159 */
160 atomic_t count; 160 atomic_t count;
161 161
162 int id; /* ida allocated in-hierarchy ID */
163
162 /* 164 /*
163 * We link our 'sibling' struct into our parent's 'children'. 165 * We link our 'sibling' struct into our parent's 'children'.
164 * Our children link their 'sibling' into our 'children'. 166 * Our children link their 'sibling' into our 'children'.