[CRIU] [PATCH] unix: Use helper to search for task

Pavel Emelyanov xemul at virtuozzo.com
Fri May 13 06:33:54 PDT 2016


Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
 criu/sk-unix.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/criu/sk-unix.c b/criu/sk-unix.c
index 1396d76..e18480d 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -186,10 +186,7 @@ static int resolve_rel_name(struct unix_sk_desc *sk, const struct fd_parms *p)
 	int mntns_root, i;
 	struct ns_id *ns;
 
-	for_each_pstree_item(task) {
-		if (task->pid.real == p->pid)
-			break;
-	}
+	task = pstree_item_by_real(p->pid);
 	if (!task) {
 		pr_err("Can't find task with pid %d\n", p->pid);
 		return -ENOENT;
-- 
2.5.0


More information about the CRIU mailing list