Commit 2482c5a2 authored by Pavel Emelyanov's avatar Pavel Emelyanov

rst: Move initial nr_in_progress initialization

It's better to init it closer to the rest of rst orchestration.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 70af6cdd
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment