[RESEND,v1,42/55] fdstore: Init fdstore earlier

Submitted by Kirill Tkhai on March 24, 2017, 3:15 p.m.

Details

Message ID 149036853806.23093.15509659813976124742.stgit@localhost.localdomain
State New
Series "Nested pid namespaces support"
Headers show

Commit Message

Kirill Tkhai March 24, 2017, 3:15 p.m.
Do that before creation of usernsd. This allows to get fdstore
files from usernsd.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 criu/cr-restore.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index f7de0b25..0ac35b31 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -1407,8 +1407,6 @@  static int restore_task_with_children(void *_arg)
 		if (prepare_shared_tty())
 			goto err;
 
-		if (fdstore_init())
-			goto err;
 		if (join_namespaces()) {
 			pr_perror("Join namespaces failed");
 			goto err;
@@ -1843,6 +1841,9 @@  static int restore_root_task(struct pstree_item *init)
 	if (prepare_userns_hook())
 		return -1;
 
+	if (fdstore_init())
+		return -1;
+
 	if (prepare_namespace_before_tasks())
 		return -1;