Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760505AbZCSTdP (ORCPT ); Thu, 19 Mar 2009 15:33:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758293AbZCSTc5 (ORCPT ); Thu, 19 Mar 2009 15:32:57 -0400 Received: from bombadil.infradead.org ([18.85.46.34]:42952 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757764AbZCSTcz (ORCPT ); Thu, 19 Mar 2009 15:32:55 -0400 Date: Thu, 19 Mar 2009 15:32:49 -0400 From: Christoph Hellwig To: Sage Weil Cc: Christoph Hellwig , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, akpm@linux-foundation.org, viro@zeniv.linux.org.uk, adilger@sun.com Subject: Re: [PATCH] vfs: make real_lookup do dentry revalidation with i_mutex held Message-ID: <20090319193249.GA23267@infradead.org> References: <20090317081730.GA20213@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1112 Lines: 22 On Tue, Mar 17, 2009 at 10:03:35AM -0700, Sage Weil wrote: > On Tue, 17 Mar 2009, Christoph Hellwig wrote: > > Keeping i_mutes over do_revalidate seem fine from a first glance, but > > can you please do it without rearranging the whole code? > > Yeah, but not without an extra goto. Holding i_mutex over revalidate is > only half of it... we also want to go ahead with the ->lookup if the > revalidate fails (instead of returning -ENOENT). I make the patch easier > to read (with a goto), but I assumed we'd want the resulting code to be > more clear? Well, if you want to re-organize real_lookup make that a separate patch. Might actually be worthwile to do so and clean up the other issues in there (too long line in the prototype, spaces after the pointer *, too. And then have a small patch ontop to implement the mutex and going ahead with the lookup. -- 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/