Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755477AbYK0BPn (ORCPT ); Wed, 26 Nov 2008 20:15:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752328AbYK0BPe (ORCPT ); Wed, 26 Nov 2008 20:15:34 -0500 Received: from wavehammer.waldi.eu.org ([82.139.201.20]:59041 "EHLO wavehammer.waldi.eu.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752095AbYK0BPe (ORCPT ); Wed, 26 Nov 2008 20:15:34 -0500 Date: Thu, 27 Nov 2008 02:19:10 +0100 From: Bastian Blank To: Sukadev Bhattiprolu Cc: oleg@redhat.com, ebiederm@xmission.com, roland@redhat.com, containers@lists.osdl.org, linux-kernel@vger.kernel.org, xemul@openvz.org Subject: Re: [RFC][PATCH 1/5] pid: Implement ns_of_pid Message-ID: <20081127011910.GD13545@wavehammer.waldi.eu.org> Mail-Followup-To: Bastian Blank , Sukadev Bhattiprolu , oleg@redhat.com, ebiederm@xmission.com, roland@redhat.com, containers@lists.osdl.org, linux-kernel@vger.kernel.org, xemul@openvz.org References: <20081126034242.GA23120@us.ibm.com> <20081126034442.GA23238@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20081126034442.GA23238@us.ibm.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 798 Lines: 26 On Tue, Nov 25, 2008 at 07:44:42PM -0800, Sukadev Bhattiprolu wrote: > +/* ns_of_pid returns the pid namespace in which the specified > + * pid was allocated. > + */ > +static inline struct pid_namespace *ns_of_pid(struct pid *pid) > +{ > + struct pid_namespace *ns = NULL; > + if (pid) > + ns = pid->numbers[pid->level].ns; > + return ns; > +} > + When can the pid argument be null? Bastian -- Another Armenia, Belgium ... the weak innocents who always seem to be located on a natural invasion route. -- Kirk, "Errand of Mercy", stardate 3198.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/