]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
ptrace: __ptrace_unlink: use the ptrace_reparented() helper
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 30 Apr 2008 07:53:14 +0000 (00:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:38 +0000 (08:29 -0700)
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 <oleg@tv-sign.ru>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/ptrace.c

index dac4b4e572931b5cd7fd7da192883e3ad2febf0b..ce66d66881fdaf935b2010ba84ec8b623686420c 100644 (file)
@@ -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;