mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-20 16:46:23 +08:00
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:
parent
9e9e3cbc62
commit
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:
|
||||||
|
Loading…
Reference in New Issue
Block a user