aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/namei.c b/fs/namei.c
index cfebb4fe675d..285001f7b84e 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1851,7 +1851,7 @@ static int path_init(int dfd, const char *name, unsigned int flags,
1851 int retval = 0; 1851 int retval = 0;
1852 1852
1853 nd->last_type = LAST_ROOT; /* if there are only slashes... */ 1853 nd->last_type = LAST_ROOT; /* if there are only slashes... */
1854 nd->flags = flags | LOOKUP_JUMPED; 1854 nd->flags = flags | LOOKUP_JUMPED | LOOKUP_PARENT;
1855 nd->depth = 0; 1855 nd->depth = 0;
1856 nd->base = NULL; 1856 nd->base = NULL;
1857 if (flags & LOOKUP_ROOT) { 1857 if (flags & LOOKUP_ROOT) {
@@ -1983,7 +1983,7 @@ static int path_lookupat(int dfd, const char *name,
1983 * be handled by restarting a traditional ref-walk (which will always 1983 * be handled by restarting a traditional ref-walk (which will always
1984 * be able to complete). 1984 * be able to complete).
1985 */ 1985 */
1986 err = path_init(dfd, name, flags | LOOKUP_PARENT, nd); 1986 err = path_init(dfd, name, flags, nd);
1987 1987
1988 if (unlikely(err)) 1988 if (unlikely(err))
1989 goto out; 1989 goto out;
@@ -2329,7 +2329,7 @@ path_mountpoint(int dfd, const char *name, struct path *path, unsigned int flags
2329 struct nameidata nd; 2329 struct nameidata nd;
2330 int err; 2330 int err;
2331 2331
2332 err = path_init(dfd, name, flags | LOOKUP_PARENT, &nd); 2332 err = path_init(dfd, name, flags, &nd);
2333 if (unlikely(err)) 2333 if (unlikely(err))
2334 goto out; 2334 goto out;
2335 2335
@@ -3220,7 +3220,7 @@ static struct file *path_openat(int dfd, struct filename *pathname,
3220 goto out; 3220 goto out;
3221 } 3221 }
3222 3222
3223 error = path_init(dfd, pathname->name, flags | LOOKUP_PARENT, nd); 3223 error = path_init(dfd, pathname->name, flags, nd);
3224 if (unlikely(error)) 3224 if (unlikely(error))
3225 goto out; 3225 goto out;
3226 3226