ptrace: kill task_ptrace()

task_ptrace(task) simply dereferences task->ptrace and isn't even used
consistently only adding confusion.  Kill it and directly access
->ptrace instead.

This doesn't introduce any behavior change.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
This commit is contained in:
Tejun Heo
2011-06-17 16:50:34 +02:00
committed by Oleg Nesterov
parent 544b2c91a9
commit d21142ece4
5 changed files with 20 additions and 32 deletions

View File

@@ -339,8 +339,7 @@ static struct task_struct *select_bad_process(unsigned int *ppoints,
* then wait for it to finish before killing
* some other task unnecessarily.
*/
if (!(task_ptrace(p->group_leader) &
PT_TRACE_EXIT))
if (!(p->group_leader->ptrace & PT_TRACE_EXIT))
return ERR_PTR(-1UL);
}
}