summaryrefslogtreecommitdiffstats
path: root/include/linux/cgroup.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2012-11-19 09:02:12 -0800
committerTejun Heo <tj@kernel.org>2012-11-19 09:02:12 -0800
commit0a950f65e1e64f4e82b4b5507773848ea88bcb8e (patch)
tree90106ea13abc3cfe9226dc0c7628ccad136f92b4 /include/linux/cgroup.h
parent033fa1c5f5f73833598a0beb022c0048fb769dad (diff)
downloadlinux-0a950f65e1e64f4e82b4b5507773848ea88bcb8e.tar.gz
linux-0a950f65e1e64f4e82b4b5507773848ea88bcb8e.tar.bz2
linux-0a950f65e1e64f4e82b4b5507773848ea88bcb8e.zip
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 {
*/
atomic_t count;
+ int id; /* ida allocated in-hierarchy ID */
+
/*
* We link our 'sibling' struct into our parent's 'children'.
* Our children link their 'sibling' into our 'children'.