Skip to contentSkip to conversation

vfs - fix automount should ignore LOOKUP_FOLLOW

PATCH In review Ian Kent 2 participants 3 messages Oct 22, 2011 – Oct 23, 2011 VFS

lore
Share & tools
lore

Ian Kent

author
#0 lore raw

PATCH 1/1 vfs - fix automount should ignore LOOKUP_FOLLOW

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.

---

 fs/namei.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/namei.c +1 -1
index 0b3138d..e4eee7c 100644
@@ -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;
#1 lore raw
Quoted 8 lines · Ian Kent

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.

LOOKUP_CONTINUE flag no longer exists (commit 49084c3 "kill LOOKUP_CONTINUE")

So this patch makes no sense for HEAD, it may make sense for backports.

Miklos

Quoted 22 lines

---

 fs/namei.c |    2 +-

 1 files changed, 1 insertions(+), 1 deletions(-)
fs/namei.c +1 -1
index 0b3138d..e4eee7c 100644
@@ -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;

author
#2 lore raw
Quoted 11 lines · Miklos Szeredi
Quoted 8 lines · Ian Kent

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.

LOOKUP_CONTINUE flag no longer exists (commit 49084c3 "kill LOOKUP_CONTINUE")

Oh .. right, now I think about it I did see that commit, opps!

Quoted 2 lines

So this patch makes no sense for HEAD, it may make sense for backports.

Yeah, I was a bit to hasty trying to solve my own backport mistake.

Quoted 25 lines

Miklos

Quoted 22 lines

---

 fs/namei.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/namei.c +1 -1
index 0b3138d..e4eee7c 100644
@@ -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;