lkml.org 
[lkml]   [2009]   [May]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC PATCH 5/X] ptrace: mv task_struct->ptrace ptrace_task->pt_flags, kill ptrace_link()

* Oleg Nesterov <oleg@redhat.com> wrote:

> struct ptrace_task {
> + unsigned long pt_flags;
> };

> - return task->ptrace;
> + return unlikely(task->ptrace_task) ?
> + task->ptrace_task->pt_flags : 0;

Please no pt_ prefixes. It is abundantly clear from the
'->ptrace_ctx' portion already that it's about ptrace - the rest
should be a straightforward minimalistic naming - i.e.
->ptrace_ctx->flags.

Also, is the conditional necessary? We should not be calling ptrace
methods on tasks with no ptrace context.

Thanks,

Ingo


\
 
 \ /
  Last update: 2009-05-25 05:35    [W:0.049 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site