From: Li Zhong <zhong@linux•vnet.ibm.com>
To: linux-next list <linux-next@vger•kernel.org>
Cc: tj@kernel•org, lizefan@huawei•com
Subject: [PATCH linux-next]cgroup: move list add after list head initilization
Date: Wed, 28 Nov 2012 17:15:21 +0800 [thread overview]
Message-ID: <1354094121.3054.28.camel@ThinkPad-T5421.cn.ibm.com> (raw)
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
next reply other threads:[~2012-11-28 9:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-28 9:15 Li Zhong [this message]
2012-11-28 14:04 ` [PATCH linux-next]cgroup: move list add after list head initilization Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1354094121.3054.28.camel@ThinkPad-T5421.cn.ibm.com \
--to=zhong@linux$(echo .)vnet.ibm.com \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=lizefan@huawei$(echo .)com \
--cc=tj@kernel$(echo .)org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox