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 #21238 is a reply to message #21221] Wed, 03 October 2007 16:42 Go to previous messageGo to previous message
Matt Mackall is currently offline  Matt Mackall
Messages: 9
Registered: April 2007
Junior Member
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.

--
Mathematics is the supreme nostalgia of our time.
 
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:25:54 GMT 2025

Total time taken to generate the page: 0.11300 seconds