OpenVZ Forum


Home » Mailing lists » Devel » [PATCH 0/3] Make tasks always have non-zero pids
Re: [PATCH 2/3] Prepare pid_nr() etc functions to work with not-NULL pids [message #21341 is a reply to message #21313] Fri, 05 October 2007 13:16 Go to previous messageGo to previous message
Pavel Emelianov is currently offline  Pavel Emelianov
Messages: 1149
Registered: September 2006
Senior Member
Matt Mackall wrote:
> On Thu, Oct 04, 2007 at 12:54:17PM +0400, Pavel Emelyanov wrote:
>> Matt Mackall wrote:
>>> On Wed, Oct 03, 2007 at 06:20:43PM +0400, Pavel Emelyanov wrote:
>>>> Just make the __pid_nr() etc functions that expect the argument
>>>> to always be not NULL.
>>>>
>>>> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
>>>>  static inline pid_t pid_nr(struct pid *pid)
>>>>  {
>>>>  	pid_t nr = 0;
>>>>  	if (pid)
>>>> -		nr = pid->numbers[0].nr;
>>>> +		nr = __pid_nr(pid);
>>>>  	return nr;
>>>>  }
>>> Is there a patch that removes these inlines? Otherwise this looks good
>>> to me.
>> Not yet. Some of are uninlined already, but others are not. I'd like 
>> to make some testing before uninline them.
> 
> I was asking about the whole function, actually, not the keyword. Is
> this function not equivalent to __pid_nr now?

Oh, I see. I haven't managed to check the whole kernel yet that all
the users of pid_xnr() calls pass not-null pointer there. This is 
in TODO list.

Thanks,
Pavel
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: post1
Next Topic: [PATCH 0/5] Kernel memory accounting container (v5)
Goto Forum:
  


Current Time: Mon Sep 01 02:27:31 GMT 2025

Total time taken to generate the page: 0.06371 seconds