[v4,01/19] core: Init fdstore even earlier

Submitted by Kirill Tkhai on Jan. 10, 2018, 2 p.m.

Details

Message ID 151559283202.31108.7206398258587904814.stgit@localhost.localdomain
State Accepted
Series "Introduce custom per-task service fds placement"
Headers show

Commit Message

Kirill Tkhai Jan. 10, 2018, 2 p.m.
Next patch will move SELF_STDIN_OFF sfd to fdstore.
This patch moves fdstore_init() before tty_prep_fds().

v4: New

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

Patch hide | download patch | download mbox

diff --git a/criu/cr-restore.c b/criu/cr-restore.c
index 7545572dc..f9889099f 100644
--- a/criu/cr-restore.c
+++ b/criu/cr-restore.c
@@ -2204,9 +2204,6 @@  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;
 
@@ -2533,6 +2530,9 @@  int cr_restore_tasks(void)
 	if (prepare_pstree() < 0)
 		goto err;
 
+	if (fdstore_init())
+		goto err;
+
 	if (crtools_prepare_shared() < 0)
 		goto err;