From: Ian Kent Date: Thu, 24 Jul 2008 04:30:28 +0000 (-0700) Subject: autofs4: fix direct mount pending expire race - correction X-Git-Tag: v2.6.27-rc1~624 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec6e8c7d3f9073336ec7b2eed3fcda6f922087c3;p=linux-2.6 autofs4: fix direct mount pending expire race - correction Appologies, somehow I seem to have sent an out dated version of this patch. Here is an additional patch that brings the patch up to date. Signed-off-by: Ian Kent Cc: Jeff Moyer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c index adbd8559e8..e062ee5a3e 100644 --- a/fs/autofs4/root.c +++ b/fs/autofs4/root.c @@ -241,13 +241,7 @@ static void *autofs4_follow_link(struct dentry *dentry, struct nameidata *nd) /* Follow down to our covering mount. */ if (!follow_down(&nd->path.mnt, &nd->path.dentry)) goto done; - /* - * We shouldn't need to do this but we have no way - * of knowing what may have been done so try a follow - * just in case. - */ - autofs4_follow_mount(&nd->path.mnt, &nd->path.dentry); - goto done; + goto follow; } spin_unlock(&sbi->fs_lock); goto done; @@ -273,7 +267,7 @@ cont: /* We trigger a mount for almost all flags */ lookup_type = nd->flags & (TRIGGER_FLAGS | TRIGGER_INTENTS); if (!(lookup_type || dentry->d_flags & DCACHE_AUTOFS_PENDING)) - goto done; + goto follow; /* * If the dentry contains directories then it is an autofs