From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Moyer Subject: Re: [PATCH 4/7] autofs4 - fix indirect mount pending expire race Date: Fri, 18 Jul 2008 15:14:14 -0400 Message-ID: References: <20080718023651.12802.59107.stgit@raven.themaw.net> <20080718023717.12802.80763.stgit@raven.themaw.net> <1216407362.18371.10.camel@raven.themaw.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , autofs mailing list , Kernel Mailing List , linux-fsdevel , Al Viro , Linus Torvalds To: Ian Kent Return-path: Received: from mx1.redhat.com ([66.187.233.31]:59734 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750967AbYGRTOb (ORCPT ); Fri, 18 Jul 2008 15:14:31 -0400 In-Reply-To: <1216407362.18371.10.camel@raven.themaw.net> (Ian Kent's message of "Sat, 19 Jul 2008 02:56:01 +0800") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Ian Kent writes: > On Fri, 2008-07-18 at 14:52 -0400, Jeff Moyer wrote: >> Ian Kent writes: >> > } else { >> > + /* Path walk currently on this dentry? */ >> > + ino_count = atomic_read(&ino->count) + 1; >> > + if (atomic_read(&dentry->d_count) > ino_count) >> > + goto next; >> > + >> > expired = autofs4_check_leaves(mnt, dentry, timeout, do_now); >> > if (expired) { >> > dput(dentry); > > The expired dentry may be a different dentry! > >> > found: >> > DPRINTK("returning %p %.*s", >> > expired, (int)expired->d_name.len, expired->d_name.name); >> > + ino = autofs4_dentry_ino(expired); >> >> If we get here, ino is already set to the autofs4_dentry_ino(expired), >> so this statement is redundant. > > Almost but see above. Ah, you're right, I missed that. Cheers, Jeff