lkml.org 
[lkml]   [2019]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v1 1/2] pidfd: add P_PIDFD to waitid()
From
On July 26, 2019 11:26:45 PM GMT+02:00, Linus Torvalds <torvalds@linux-foundation.org> wrote:
>On Fri, Jul 26, 2019 at 2:41 AM Christian Brauner
><christian@brauner.io> wrote:
>>
>> - if (type < PIDTYPE_MAX)
>> + if (type < PIDTYPE_MAX && !pid)
>> pid = find_get_pid(upid);
>
>So now we have four cases in the switch statement, and two of them do
>*not* want that "find_get_pid()" call.
>
>Honestly, let's just move that whole thing into the switch statement
>for the two cases that do want it. Particulartly since I think the
>"upid == 0" case for P_PGID will prefer it that way anyway.
>
>Let's not check 'type' in two different places in two completely
>different ways.
>
>Ok?
>
> Linus

Ok, will resend with that changed.

Christian

\
 
 \ /
  Last update: 2019-07-26 23:31    [W:0.067 / U:4.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site