From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:53653 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751494Ab1BXO75 (ORCPT ); Thu, 24 Feb 2011 09:59:57 -0500 Date: Thu, 24 Feb 2011 14:59:47 +0000 From: Al Viro To: Ian Kent Cc: Trond Myklebust , David Howells , Kernel Mailing List , linux-fsdevel , Linus Torvalds , Andrew Morton , Linux NFS Mailing List , npiggin@gmail.com Subject: Re: [PATCH 0/3] Fixes for vfs-scale and vfs-automount Message-ID: <20110224145947.GA22723@ZenIV.linux.org.uk> References: <1295420817.3076.24.camel@perseus> <1297779902.13007.86.camel@perseus> <20110224015817.GQ22723@ZenIV.linux.org.uk> <1298516618.2916.20.camel@perseus> <20110224031439.GR22723@ZenIV.linux.org.uk> <1298518137.2916.35.camel@perseus> <20110224035836.GS22723@ZenIV.linux.org.uk> <1298529260.2916.91.camel@perseus> <20110224070724.GW22723@ZenIV.linux.org.uk> <1298542053.3058.56.camel@perseus> Content-Type: text/plain; charset=us-ascii In-Reply-To: <1298542053.3058.56.camel@perseus> Sender: linux-nfs-owner@vger.kernel.org List-ID: MIME-Version: 1.0 On Thu, Feb 24, 2011 at 06:07:33PM +0800, Ian Kent wrote: > > I really don't like the look of autofs4_tree_busy(), BTW - you don't need > > RCU to get races here; just a plain chdir("../../.."); done by a process > > that sits deep enough in subtree you are checking can very well race with > > your check, so that your iterator gets through the new cwd before chdir() > > and through the old one after it... > > Yes, that's a problem. > > Previously the dcache_lock would have blocked on the dput() ... mmm, I'd > missed that so far, although Nick didn't talk with me about his changes > very much at all and I didn't pay enough attention to his patch series > along the way, oops! Well... In principle, you could mark all mountpoints in a tree as managed, have an "expiry search in progress" flag to stop everything in there while the expiry happens, then wait out all RCU walks in progress, then go ahead with your expiry checks. Would that work for you?