aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4/root.c
diff options
context:
space:
mode:
authorIan Kent <raven@themaw.net>2012-10-11 08:00:33 +0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-11 10:21:16 +0900
commit49999ab27eab6289a8e4f450e148bdab521361b2 (patch)
tree55881aee2989306431d5e98fdd3d9e09d2b5e6c7 /fs/autofs4/root.c
parent14ffe009ca60856555df3aec942239d8beed74d3 (diff)
downloadkernel_goldelico_gta04-49999ab27eab6289a8e4f450e148bdab521361b2.zip
kernel_goldelico_gta04-49999ab27eab6289a8e4f450e148bdab521361b2.tar.gz
kernel_goldelico_gta04-49999ab27eab6289a8e4f450e148bdab521361b2.tar.bz2
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 e7396cf..91b1165 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)) {