aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2012-10-11 08:00:33 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-10-21 09:17:10 -0700
commit3a738a8aa3dd4fae6998b4cbc7a1043f44086035 (patch)
tree7b89c02a0ef9faf17599615b09e163f228136c08 /fs
parent2101aa5bb084931f22fa08cacd6d69c80afade7f (diff)
downloadkernel_samsung_smdk4412-3a738a8aa3dd4fae6998b4cbc7a1043f44086035.zip
kernel_samsung_smdk4412-3a738a8aa3dd4fae6998b4cbc7a1043f44086035.tar.gz
kernel_samsung_smdk4412-3a738a8aa3dd4fae6998b4cbc7a1043f44086035.tar.bz2
autofs4 - fix reset pending flag on mount fail
commit 49999ab27eab6289a8e4f450e148bdab521361b2 upstream. 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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs')
-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 f55ae23..790fa63 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -392,10 +392,12 @@ static struct vfsmount *autofs4_d_automount(struct path *path)
ino->flags |= AUTOFS_INF_PENDING;
spin_unlock(&sbi->fs_lock);
status = autofs4_mount_wait(dentry);
- if (status)
- return ERR_PTR(status);
spin_lock(&sbi->fs_lock);
ino->flags &= ~AUTOFS_INF_PENDING;
+ if (status) {
+ spin_unlock(&sbi->fs_lock);
+ return ERR_PTR(status);
+ }
}
done:
if (!(ino->flags & AUTOFS_INF_EXPIRING)) {