mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 01:55:22 +03:00
cgroup.c: check return value of unit_realize_cgroup_now()
do not recurse further, if unit_realize_cgroup_now() failed
This commit is contained in:
parent
73814ca287
commit
1f11a0cdfe
@ -432,8 +432,13 @@ static int unit_realize_cgroup_now(Unit *u) {
|
||||
return 0;
|
||||
|
||||
/* First, realize parents */
|
||||
if (UNIT_ISSET(u->slice))
|
||||
unit_realize_cgroup_now(UNIT_DEREF(u->slice));
|
||||
if (UNIT_ISSET(u->slice)) {
|
||||
int r;
|
||||
|
||||
r = unit_realize_cgroup_now(UNIT_DEREF(u->slice));
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
/* And then do the real work */
|
||||
return unit_create_cgroups(u, mask);
|
||||
|
Loading…
Reference in New Issue
Block a user