aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/root.c
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2012-10-10 20:00:33 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-10 21:21:16 -0400
commit49999ab27eab6289a8e4f450e148bdab521361b2 (patch)
tree55881aee2989306431d5e98fdd3d9e09d2b5e6c7 /fs/autofs4/root.c
parent14ffe009ca60856555df3aec942239d8beed74d3 (diff)
autofs4 - fix reset pending flag on mount fail
In autofs4_d_automount(), if a mount fail occurs the AUTOFS_INF_PENDING mount pending flag is not cleared. One effect of this is when using the "browse" option, directory entry attributes show up with all "?"s due to the incorrect callback and subsequent failure return (when in fact no callback should be made). Signed-off-by: Ian Kent <ikent@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/autofs4/root.c')
-rw-r--r--fs/autofs4/root.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index e7396cfdb109..91b11650722e 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -392,10 +392,12 @@ static struct vfsmount *autofs4_d_automount(struct path *path)
392 ino->flags |= AUTOFS_INF_PENDING; 392 ino->flags |= AUTOFS_INF_PENDING;
393 spin_unlock(&sbi->fs_lock); 393 spin_unlock(&sbi->fs_lock);
394 status = autofs4_mount_wait(dentry); 394 status = autofs4_mount_wait(dentry);
395 if (status)
396 return ERR_PTR(status);
397 spin_lock(&sbi->fs_lock); 395 spin_lock(&sbi->fs_lock);
398 ino->flags &= ~AUTOFS_INF_PENDING; 396 ino->flags &= ~AUTOFS_INF_PENDING;
397 if (status) {
398 spin_unlock(&sbi->fs_lock);
399 return ERR_PTR(status);
400 }
399 } 401 }
400done: 402done:
401 if (!(ino->flags & AUTOFS_INF_EXPIRING)) { 403 if (!(ino->flags & AUTOFS_INF_EXPIRING)) {