Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

vfs: remove LOOKUP_NO_AUTOMOUNT flag

That flag no longer makes sense, since we don't look up automount points
as eagerly any more. Additionally, it turns out that the NO_AUTOMOUNT
handling was buggy to begin with: it would avoid automounting even for
cases where we really *needed* to do the automount handling, and could
return ENOENT for autofs entries that hadn't been instantiated yet.

With our new non-eager automount semantics, one discussion has been
about adding a AT_AUTOMOUNT flag to vfs_fstatat (and thus the
newfstatat() and fstatat64() system calls), but it's probably not worth
it: you can always force at least directory automounting by simply
adding the final '/' to the filename, which works for *all* of the stat
family system calls, old and new.

So AT_NO_AUTOMOUNT (and thus LOOKUP_NO_AUTOMOUNT) really were just a
result of our bad default behavior.

Acked-by: Ian Kent <raven@themaw.net>
Acked-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+1 -9
-6
fs/namei.c
··· 721 721 if (!path->dentry->d_op || !path->dentry->d_op->d_automount) 722 722 return -EREMOTE; 723 723 724 - /* We don't want to mount if someone supplied AT_NO_AUTOMOUNT 725 - * and this is the terminal part of the path. 726 - */ 727 - if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_PARENT)) 728 - return -EISDIR; /* we actually want to stop here */ 729 - 730 724 /* We don't want to mount if someone's just doing a stat - 731 725 * unless they're stat'ing a directory and appended a '/' to 732 726 * the name.
-2
fs/stat.c
··· 81 81 82 82 if (!(flag & AT_SYMLINK_NOFOLLOW)) 83 83 lookup_flags |= LOOKUP_FOLLOW; 84 - if (flag & AT_NO_AUTOMOUNT) 85 - lookup_flags |= LOOKUP_NO_AUTOMOUNT; 86 84 if (flag & AT_EMPTY_PATH) 87 85 lookup_flags |= LOOKUP_EMPTY; 88 86
+1 -1
include/linux/namei.h
··· 53 53 #define LOOKUP_PARENT 0x0010 54 54 #define LOOKUP_REVAL 0x0020 55 55 #define LOOKUP_RCU 0x0040 56 - #define LOOKUP_NO_AUTOMOUNT 0x0080 56 + 57 57 /* 58 58 * Intent data 59 59 */