aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-11 08:47:41 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-11 08:47:41 +0100
commit2fc10246766fce0b560f015e1c0b6ff29fb4ced0 (patch)
tree0510322a0d3a8171afb1e06a7ce809f023578825 /fs/namei.c
parentmisc: isl29003: Missing a blank line after declarations (diff)
parentLinux 4.15-rc3 (diff)
downloadlinux-dev-2fc10246766fce0b560f015e1c0b6ff29fb4ced0.tar.xz
linux-dev-2fc10246766fce0b560f015e1c0b6ff29fb4ced0.zip
Merge 4.15-rc3 into char-misc-next
We want the fixes and changes in here for testing. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/fs/namei.c b/fs/namei.c
index f0c7a7b9b6ca..9cc91fb7f156 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1129,18 +1129,9 @@ static int follow_automount(struct path *path, struct nameidata *nd,
* of the daemon to instantiate them before they can be used.
*/
if (!(nd->flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY |
- LOOKUP_OPEN | LOOKUP_CREATE |
- LOOKUP_AUTOMOUNT))) {
- /* Positive dentry that isn't meant to trigger an
- * automount, EISDIR will allow it to be used,
- * otherwise there's no mount here "now" so return
- * ENOENT.
- */
- if (path->dentry->d_inode)
- return -EISDIR;
- else
- return -ENOENT;
- }
+ LOOKUP_OPEN | LOOKUP_CREATE | LOOKUP_AUTOMOUNT)) &&
+ path->dentry->d_inode)
+ return -EISDIR;
if (path->dentry->d_sb->s_user_ns != &init_user_ns)
return -EACCES;