mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-28 04:33:49 +00:00
rst: Move initial nr_in_progress initialization
It's better to init it closer to the rest of rst orchestration. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
70af6cdd62
commit
2482c5a24b
1 changed files with 1 additions and 2 deletions
|
|
@ -1132,6 +1132,7 @@ static int restore_root_task(struct pstree_item *init, struct cr_options *opts)
|
|||
return -1;
|
||||
}
|
||||
|
||||
futex_set(&task_entries->nr_in_progress, task_entries->nr_tasks + task_entries->nr_helpers);
|
||||
|
||||
ret = fork_with_pid(init, opts->namespaces_flags);
|
||||
if (ret < 0)
|
||||
|
|
@ -1230,8 +1231,6 @@ int cr_restore_tasks(pid_t pid, struct cr_options *opts)
|
|||
if (crtools_prepare_shared() < 0)
|
||||
return -1;
|
||||
|
||||
futex_set(&task_entries->nr_in_progress, task_entries->nr_tasks + task_entries->nr_helpers);
|
||||
|
||||
return restore_root_task(root_item, opts);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue