Re: [PATCH] vfs - fix automount should ignore LOOKUP_FOLLOW

From: Miklos Szeredi
Date: Sun Oct 23 2011 - 00:42:41 EST


On Sat, Oct 22, 2011 at 10:01 AM, Ian Kent <raven@xxxxxxxxxx> wrote:
> 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

>
> Signed-off-by: Ian Kent <raven@xxxxxxxxxx>
> ---
>
> Â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;
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/