[CRIU] [PATCH 18/28] files: Assign fdesc to fle in collect_fd() earlier

Kirill Tkhai ktkhai at virtuozzo.com
Mon Jun 5 20:26:05 MSK 2017


Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 criu/files.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/files.c b/criu/files.c
index bbf3edae8..ce52ebd86 100644
--- a/criu/files.c
+++ b/criu/files.c
@@ -723,6 +723,7 @@ int collect_fd(int pid, FdinfoEntry *e, struct rst_info *rst_info)
 		pr_err("No file for fd %d id %#x\n", e->fd, e->id);
 		return -1;
 	}
+	new_le->desc = fdesc;
 
 	list_for_each_entry(le, &fdesc->fd_info_head, desc_list)
 		if (pid_rst_prio(new_le->pid, le->pid))
@@ -731,7 +732,6 @@ int collect_fd(int pid, FdinfoEntry *e, struct rst_info *rst_info)
 	collect_task_fd(new_le, rst_info);
 
 	list_add_tail(&new_le->desc_list, &le->desc_list);
-	new_le->desc = fdesc;
 
 	return 0;
 }



More information about the CRIU mailing list