linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] autofs4 - fix reset pending flag on mount fail
@ 2012-10-11  0:00 Ian Kent
  0 siblings, 0 replies; only message in thread
From: Ian Kent @ 2012-10-11  0:00 UTC (permalink / raw)
  To: Linus Torvalds
  Cc: autofs mailing list, linux-fsdevel, Kernel Mailing List, stable

From: Ian Kent <raven@themaw.net>

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
---

 0 files changed, 0 insertions(+), 0 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)) {


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-10-11  0:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-11  0:00 [PATCH] autofs4 - fix reset pending flag on mount fail Ian Kent

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).