aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2006-09-29 05:00:54 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-29 12:18:18 -0400
commit44938af6e08580514abce8bea23ae1c034ea0b1d (patch)
tree98b23773af1a0a8482a09eb60f5dc4a732484d58 /fs
parentbe3ca7fecb1a9903c6253f49aec0af2a0f3a04e4 (diff)
[PATCH] autofs4: pending flag not cleared on mount fail
During testing I've found that the mount pending flag can be left set at exit from autofs4_lookup after a failed mount request. This shouldn't be allowed to happen and causes incorrect error returns. 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')
-rw-r--r--fs/autofs4/root.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 0ec24835239f..563ef9d7da9f 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -281,9 +281,6 @@ static int try_to_fill_dentry(struct dentry *dentry, int flags)
281 281
282 DPRINTK("mount done status=%d", status); 282 DPRINTK("mount done status=%d", status);
283 283
284 if (status && dentry->d_inode)
285 return status; /* Try to get the kernel to invalidate this dentry */
286
287 /* Turn this into a real negative dentry? */ 284 /* Turn this into a real negative dentry? */
288 if (status == -ENOENT) { 285 if (status == -ENOENT) {
289 spin_lock(&dentry->d_lock); 286 spin_lock(&dentry->d_lock);
@@ -540,6 +537,9 @@ static struct dentry *autofs4_lookup(struct inode *dir, struct dentry *dentry, s
540 return ERR_PTR(-ERESTARTNOINTR); 537 return ERR_PTR(-ERESTARTNOINTR);
541 } 538 }
542 } 539 }
540 spin_lock(&dentry->d_lock);
541 dentry->d_flags &= ~DCACHE_AUTOFS_PENDING;
542 spin_unlock(&dentry->d_lock);
543 } 543 }
544 544
545 /* 545 /*