diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2008-04-30 09:53:14 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 17:29:38 +0200 |
commit | 68cb94786630b34196713794a2880ade17fca887 (patch) | |
tree | 78bd2d66aaaa2c9acdd6060a9a9964420c511ebc /kernel | |
parent | ptrace: introduce ptrace_reparented() helper (diff) | |
download | linux-68cb94786630b34196713794a2880ade17fca887.tar.xz linux-68cb94786630b34196713794a2880ade17fca887.zip |
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 <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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/ptrace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/ptrace.c b/kernel/ptrace.c index dac4b4e57293..ce66d66881fd 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; |