All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Kent <raven@themaw.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Al Viro <viro@ZenIV.linux.org.uk>,
	David Howells <dhowells@redhat.com>,
	Miklos Szeredi <miklos@szeredi.hu>
Subject: [PATCH] vfs - fix automount should ignore LOOKUP_FOLLOW
Date: Sat, 22 Oct 2011 16:01:47 +0800	[thread overview]
Message-ID: <20111022080147.11165.52913.stgit@perseus.themaw.net> (raw)

The recent patch by Miklos Szeredi that was meant to restore the original
behavior of not triggering automounts on stat(2) and other symlink following
syscalls also eliminated the unconditional triggering of automounts for
intermediate path components by eliminating the LOOKUP_CONTUNUE flag from
the check in fs/namei.c:follow_automount().

This introduces a regression itself because it alters the original behaviour
which was to unconditionally automount on intermediate path components.

Signed-off-by: Ian Kent <raven@themaw.net>
---

 fs/namei.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/namei.c b/fs/namei.c
index 0b3138d..e4eee7c 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -732,7 +732,7 @@ static int follow_automount(struct path *path, unsigned flags,
 	 * as being automount points.  These will need the attentions
 	 * of the daemon to instantiate them before they can be used.
 	 */
-	if (!(flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY |
+	if (!(flags & (LOOKUP_PARENT | LOOKUP_CONTINUE | LOOKUP_DIRECTORY |
 		     LOOKUP_OPEN | LOOKUP_CREATE | LOOKUP_AUTOMOUNT)) &&
 	    path->dentry->d_inode)
 		return -EISDIR;


             reply	other threads:[~2011-10-22  8:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-22  8:01 Ian Kent [this message]
2011-10-23  4:41 ` [PATCH] vfs - fix automount should ignore LOOKUP_FOLLOW Miklos Szeredi
2011-10-23 11:33   ` Ian Kent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111022080147.11165.52913.stgit@perseus.themaw.net \
    --to=raven@themaw.net \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@ZenIV.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.