summaryrefslogtreecommitdiffstats
path: root/fs/autofs4
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2005-06-21 17:16:41 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 19:07:35 -0700
commit1684b2bba6972749bc9acee57585acd6c78050b2 (patch)
tree2af8d8837b25f82e09cfe478a103779a3e98bfc4 /fs/autofs4
parentcc9acc885819696c0ed00f4f0f0cda0c7583f116 (diff)
downloadlinux-1684b2bba6972749bc9acee57585acd6c78050b2.tar.gz
linux-1684b2bba6972749bc9acee57585acd6c78050b2.tar.bz2
linux-1684b2bba6972749bc9acee57585acd6c78050b2.zip
[PATCH] autofs4: bad lookup fix
For browsable autofs maps, a mount request that arrives at the same time an expire is happening can fail to perform the needed mount. This happens becuase the directory exists and so the revalidate succeeds when we need it to fail so that lookup is called on the same dentry to do the mount. Instead lookup is called on the next path component which should be whithin the mount, but the parent isn't mounted. The solution is to allow the revalidate to continue and perform the mount as no directory creation (at mount time) is needed for browsable mount entries. Signed-off-by: Ian Kent <raven@themaw.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/autofs4')
-rw-r--r--fs/autofs4/root.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index e137acf0543d..2a771ec66956 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -306,7 +306,14 @@ static int try_to_fill_dentry(struct dentry *dentry,
DPRINTK("expire done status=%d", status);
- return 0;
+ /*
+ * If the directory still exists the mount request must
+ * continue otherwise it can't be followed at the right
+ * time during the walk.
+ */
+ status = d_invalidate(dentry);
+ if (status != -EBUSY)
+ return 0;
}
DPRINTK("dentry=%p %.*s ino=%p",