diff options
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/fs/namei.c b/fs/namei.c index f0c7a7b9b6ca..4e3fc58dae72 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -1129,21 +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; - } - - if (path->dentry->d_sb->s_user_ns != &init_user_ns) - return -EACCES; + LOOKUP_OPEN | LOOKUP_CREATE | LOOKUP_AUTOMOUNT)) && + path->dentry->d_inode) + return -EISDIR; nd->total_link_count++; if (nd->total_link_count >= 40) |