* [PATCH linux-next]cgroup: move list add after list head initilization
@ 2012-11-28 9:15 Li Zhong
2012-11-28 14:04 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Li Zhong @ 2012-11-28 9:15 UTC (permalink / raw)
To: linux-next list; +Cc: tj, lizefan
commit 2243076ad128d0cc196cf6597e6ddcf6bc907676 initialize
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>
---
kernel/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 01d5342..35133cf 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -1400,8 +1400,8 @@ static void init_cgroup_root(struct cgroupfs_root *root)
root->number_of_cgroups = 1;
cgrp->root = root;
cgrp->top_cgroup = cgrp;
- list_add_tail(&cgrp->allcg_node, &root->allcg_list);
init_cgroup_housekeeping(cgrp);
+ list_add_tail(&cgrp->allcg_node, &root->allcg_list);
}
static bool init_root_id(struct cgroupfs_root *root)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH linux-next]cgroup: move list add after list head initilization
2012-11-28 9:15 [PATCH linux-next]cgroup: move list add after list head initilization Li Zhong
@ 2012-11-28 14:04 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2012-11-28 14:04 UTC (permalink / raw)
To: Li Zhong; +Cc: linux-next list, lizefan
On Wed, Nov 28, 2012 at 05:15:21PM +0800, Li Zhong wrote:
> commit 2243076ad128d0cc196cf6597e6ddcf6bc907676 initialize
> 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>
Applied to cgroup/for-3.8. Thanks!
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-11-28 14:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-28 9:15 [PATCH linux-next]cgroup: move list add after list head initilization Li Zhong
2012-11-28 14:04 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).