diff options
author | David Howells <dhowells@redhat.com> | 2011-01-14 19:45:31 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-01-16 02:07:33 +0100 |
commit | 6f45b65672c8017d5e210e338bb5858a938ef445 (patch) | |
tree | b62877c489fb682033c37d30d91c53e4d0c3833a /fs/stat.c | |
parent | Add a dentry op to allow processes to be held during pathwalk transit (diff) | |
download | linux-6f45b65672c8017d5e210e338bb5858a938ef445.tar.xz linux-6f45b65672c8017d5e210e338bb5858a938ef445.zip |
Add an AT_NO_AUTOMOUNT flag to suppress terminal automount
Add an AT_NO_AUTOMOUNT flag to suppress terminal automounting of automount
point directories. This can be used by fstatat() users to permit the
gathering of attributes on an automount point and also prevent
mass-automounting of a directory of automount points by ls.
Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Ian Kent <raven@themaw.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/stat.c')
-rw-r--r-- | fs/stat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/stat.c b/fs/stat.c index 12e90e213900..d5c61cf2b703 100644 --- a/fs/stat.c +++ b/fs/stat.c @@ -75,11 +75,13 @@ int vfs_fstatat(int dfd, const char __user *filename, struct kstat *stat, int error = -EINVAL; int lookup_flags = 0; - if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) + if ((flag & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT)) != 0) goto out; if (!(flag & AT_SYMLINK_NOFOLLOW)) lookup_flags |= LOOKUP_FOLLOW; + if (flag & AT_NO_AUTOMOUNT) + lookup_flags |= LOOKUP_NO_AUTOMOUNT; error = user_path_at(dfd, filename, lookup_flags, &path); if (error) |