From: Oleg Nesterov Date: Wed, 30 Apr 2008 07:53:14 +0000 (-0700) Subject: ptrace: __ptrace_unlink: use the ptrace_reparented() helper X-Git-Tag: v3.12-rc1~21138 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=68cb94786630b34196713794a2880ade17fca887;p=kernel%2Fkernel-generic.git ptrace: __ptrace_unlink: use the ptrace_reparented() helper Currently __ptrace_unlink() checks list_empty(->ptrace_list) to figure out whether the child was reparented. Change the code to use ptrace_reparented() to make this check more explicit and consistent. No functional changes. Signed-off-by: Oleg Nesterov Acked-by: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/ptrace.c b/kernel/ptrace.c index dac4b4e..ce66d66 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c @@ -73,7 +73,7 @@ void __ptrace_unlink(struct task_struct *child) BUG_ON(!child->ptrace); child->ptrace = 0; - if (!list_empty(&child->ptrace_list)) { + if (ptrace_reparented(child)) { list_del_init(&child->ptrace_list); remove_parent(child); child->parent = child->real_parent;