Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754882Ab2BOTS7 (ORCPT ); Wed, 15 Feb 2012 14:18:59 -0500 Received: from mail-bk0-f46.google.com ([209.85.214.46]:58434 "EHLO mail-bk0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754701Ab2BOTS6 (ORCPT ); Wed, 15 Feb 2012 14:18:58 -0500 Date: Wed, 15 Feb 2012 23:18:49 +0400 From: Cyrill Gorcunov To: Oleg Nesterov Cc: "Eric W. Biederman" , Pavel Emelyanov , Andrey Vagin , KOSAKI Motohiro , Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , Glauber Costa , Andi Kleen , Tejun Heo , Matt Helsley , Pekka Enberg , Eric Dumazet , Vasiliy Kulikov , Alexey Dobriyan , Valdis.Kletnieks@vt.edu, Michal Marek , Frederic Weisbecker , Andrew Morton , linux-kernel@vger.kernel.org Subject: Re: + syscalls-x86-add-__nr_kcmp-syscall-v8.patch added to -mm tree Message-ID: <20120215191849.GN1894@moon> References: <20120215143606.GA14037@redhat.com> <20120215151008.GL1894@moon> <20120215183203.GH4533@moon> <20120215190622.GA25559@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120215190622.GA25559@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 589 Lines: 22 On Wed, Feb 15, 2012 at 08:06:22PM +0100, Oleg Nesterov wrote: > > I think this should work. Or you can simply do > > struct file *file = NULL; > > task_lock(task); > rcu_read_lock(); > if (task->files) > file = fcheck_files(task->files, idx); > rcu_read_unlock(); > task_unlock(task); > Yeah, thanks, this one is better. Cyrill -- 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/