aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLi Zhong <zhong@linux.vnet.ibm.com>2012-11-28 04:15:21 -0500
committerTejun Heo <tj@kernel.org>2012-11-28 09:02:39 -0500
commitfddfb02ad0d0d3b479c2a26a8ae7e6411b34706b (patch)
treef3d8aa9e526486f4d07fc6f0a3619ce98ffeb3b9 /kernel
parent811d8d6ff59cbc7d618dfa2cd339ba6c3691a7eb (diff)
cgroup: move list add after list head initilization
2243076ad1 ("cgroup: initialize cgrp->allcg_node in init_cgroup_housekeeping()") initializes cgrp->allcg_node in init_cgroup_housekeeping(). Then in init_cgroup_root(), we should call init_cgroup_housekeeping() before adding it to &root->allcg_list; otherwise, we are initializing an entry already in a list. Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/cgroup.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 55a0a770a5a2..c02b05560d10 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1401,8 +1401,8 @@ static void init_cgroup_root(struct cgroupfs_root *root)
1401 root->number_of_cgroups = 1; 1401 root->number_of_cgroups = 1;
1402 cgrp->root = root; 1402 cgrp->root = root;
1403 cgrp->top_cgroup = cgrp; 1403 cgrp->top_cgroup = cgrp;
1404 list_add_tail(&cgrp->allcg_node, &root->allcg_list);
1405 init_cgroup_housekeeping(cgrp); 1404 init_cgroup_housekeeping(cgrp);
1405 list_add_tail(&cgrp->allcg_node, &root->allcg_list);
1406} 1406}
1407 1407
1408static bool init_root_id(struct cgroupfs_root *root) 1408static bool init_root_id(struct cgroupfs_root *root)