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>
This commit is contained in:
Родитель
9e9e3cbc62
Коммит
baef99a08a
|
@ -2434,7 +2434,9 @@ static long cgroup_create(struct cgroup *parent, struct dentry *dentry,
|
||||||
|
|
||||||
err_remove:
|
err_remove:
|
||||||
|
|
||||||
|
cgroup_lock_hierarchy(root);
|
||||||
list_del(&cgrp->sibling);
|
list_del(&cgrp->sibling);
|
||||||
|
cgroup_unlock_hierarchy(root);
|
||||||
root->number_of_cgroups--;
|
root->number_of_cgroups--;
|
||||||
|
|
||||||
err_destroy:
|
err_destroy:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче