From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Morton Subject: Re: [PATCH 2/3] autofs4 - expiring filesystem from under process Date: Mon, 11 Apr 2005 00:01:04 -0700 Message-ID: <20050411000104.430e26fb.akpm@osdl.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: michael@kmaclub.com, linux-fsdevel@vger.kernel.org, jmoyer@redhat.com, autofs@linux.kernel.org Return-path: Received: from fire.osdl.org ([65.172.181.4]:15299 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S261710AbVDKHB3 (ORCPT ); Mon, 11 Apr 2005 03:01:29 -0400 To: raven@themaw.net In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org raven@themaw.net wrote: > > static inline int autofs4_ispending(struct dentry *dentry) > { > struct autofs_info *inf = autofs4_dentry_ino(dentry); > + int pending; > > - return (dentry->d_flags & DCACHE_AUTOFS_PENDING) || > - (inf != NULL && inf->flags & AUTOFS_INF_EXPIRING); > + if (dentry->d_flags & DCACHE_AUTOFS_PENDING) > + return 1; > + > + if (inf) { > + spin_lock(&inf->sbi->fs_lock); > + pending = inf->flags & AUTOFS_INF_EXPIRING; > + spin_unlock(&inf->sbi->fs_lock); > + } > + > + return pending; This can obviously return an uninitialised variable. Were these patches very well tested?