mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
cgroup: fix --manage-cgroups=ignore
Using '--manage-cgroups=ignore' fails during restore. This fixes the use of '--manage-cgroups=ignore'. Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
parent
c71d4a54a3
commit
2b6901707c
1 changed files with 6 additions and 0 deletions
|
|
@ -1217,6 +1217,9 @@ int prepare_task_cgroup(struct pstree_item *me)
|
|||
CgSetEntry *se;
|
||||
u32 current_cgset;
|
||||
|
||||
if (opts.manage_cgroups == CG_MODE_IGNORE)
|
||||
return 0;
|
||||
|
||||
if (!rsti(me)->cg_set)
|
||||
return 0;
|
||||
|
||||
|
|
@ -1299,6 +1302,9 @@ static int restore_cgroup_prop(const CgroupPropEntry *cg_prop_entry_p, char *pat
|
|||
int cg, fd, ret = -1;
|
||||
CgroupPerms *perms = cg_prop_entry_p->perms;
|
||||
|
||||
if (opts.manage_cgroups == CG_MODE_IGNORE)
|
||||
return 0;
|
||||
|
||||
if (!cg_prop_entry_p->value) {
|
||||
pr_err("cg_prop_entry->value was empty when should have had a value\n");
|
||||
return -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue