summaryrefslogtreecommitdiffstats
path: root/kernel/cgroup.c
diff options
context:
space:
mode:
authorKAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>2009-01-29 23:25:10 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-30 03:04:43 +0100
commitbaef99a08a2e23d9386b47e53fa5f0d44fc98f66 (patch)
tree0171abae8bd05710c83444b8a236fc6ffbcac71c /kernel/cgroup.c
parentmm: OOM documentation update (diff)
downloadlinux-baef99a08a2e23d9386b47e53fa5f0d44fc98f66.tar.xz
linux-baef99a08a2e23d9386b47e53fa5f0d44fc98f66.zip
cgroups: use hierarchy mutex in creation failure path
Now, cgrp->sibling is handled under hierarchy mutex. error route should do so, too. Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Cc: Li Zefan <lizf@cn.fujitsu.com> Acked-by Paul Menage <menage@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/cgroup.c')
-rw-r--r--kernel/cgroup.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index c29831076e7a..2ae7cb47dbfa 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -2434,7 +2434,9 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,
err_remove:
+ cgroup_lock_hierarchy(root);
list_del(&cgrp->sibling);
+ cgroup_unlock_hierarchy(root);
root->number_of_cgroups--;
err_destroy: