Commit fa7ead80 authored by Pavel Emelyanov's avatar Pavel Emelyanov

unix: Use helper to search for task

Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 52bccb26
...@@ -186,10 +186,7 @@ static int resolve_rel_name(struct unix_sk_desc *sk, const struct fd_parms *p) ...@@ -186,10 +186,7 @@ static int resolve_rel_name(struct unix_sk_desc *sk, const struct fd_parms *p)
int mntns_root, i; int mntns_root, i;
struct ns_id *ns; struct ns_id *ns;
for_each_pstree_item(task) { task = pstree_item_by_real(p->pid);
if (task->pid.real == p->pid)
break;
}
if (!task) { if (!task) {
pr_err("Can't find task with pid %d\n", p->pid); pr_err("Can't find task with pid %d\n", p->pid);
return -ENOENT; return -ENOENT;
......
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