Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750975AbWJQVwI (ORCPT ); Tue, 17 Oct 2006 17:52:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750978AbWJQVwI (ORCPT ); Tue, 17 Oct 2006 17:52:08 -0400 Received: from smtp.osdl.org ([65.172.181.4]:26041 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S1750954AbWJQVwG (ORCPT ); Tue, 17 Oct 2006 17:52:06 -0400 Date: Tue, 17 Oct 2006 14:51:42 -0700 From: Andrew Morton To: Cedric Le Goater Cc: Linux Kernel Mailing List , Sukadev Bhattiprolu , Herbert Poetzl , "Eric W. Biederman" , Kirill Korotaev Subject: Re: [PATCH] add process_session() helper routine Message-Id: <20061017145142.518e4046.akpm@osdl.org> In-Reply-To: <45349658.9060805@fr.ibm.com> References: <45349658.9060805@fr.ibm.com> X-Mailer: Sylpheed version 2.2.7 (GTK+ 2.8.6; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 872 Lines: 27 On Tue, 17 Oct 2006 10:37:44 +0200 Cedric Le Goater wrote: > This patch replaces occurences of task->signal->session by a new > process_session() helper routine. > > It will be useful for pid namespaces to abstract the session pid > number. hm. > +static inline pid_t process_session(struct task_struct *tsk) > +{ > + return tsk->signal->session; > +} > + We should rename signal_struct.session to something else (session_dont_use_me_directly) so that any code which accidentally fails to use the wrapper will reliably fail to build. That means that we'll also need a helper function to set this field. - 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/