Commit deba6311 authored by Kirill Tkhai's avatar Kirill Tkhai Committed by Pavel Emelyanov

files: Assign fdesc to fle in collect_fd() earlier

Signed-off-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 5360ed76
...@@ -726,6 +726,7 @@ int collect_fd(int pid, FdinfoEntry *e, struct rst_info *rst_info, bool fake) ...@@ -726,6 +726,7 @@ int collect_fd(int pid, FdinfoEntry *e, struct rst_info *rst_info, bool fake)
pr_err("No file for fd %d id %#x\n", e->fd, e->id); pr_err("No file for fd %d id %#x\n", e->fd, e->id);
return -1; return -1;
} }
new_le->desc = fdesc;
list_for_each_entry(le, &fdesc->fd_info_head, desc_list) list_for_each_entry(le, &fdesc->fd_info_head, desc_list)
if (pid_rst_prio(new_le->pid, le->pid)) if (pid_rst_prio(new_le->pid, le->pid))
...@@ -734,7 +735,6 @@ int collect_fd(int pid, FdinfoEntry *e, struct rst_info *rst_info, bool fake) ...@@ -734,7 +735,6 @@ int collect_fd(int pid, FdinfoEntry *e, struct rst_info *rst_info, bool fake)
collect_task_fd(new_le, rst_info); collect_task_fd(new_le, rst_info);
list_add_tail(&new_le->desc_list, &le->desc_list); list_add_tail(&new_le->desc_list, &le->desc_list);
new_le->desc = fdesc;
return 0; return 0;
} }
......
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