Skip to content

Commit 980f3ea

Browse files
author
Al Viro
committed
path_init(): don't bother with LOOKUP_PARENT in argument
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
1 parent 893b777 commit 980f3ea

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎fs/namei.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,7 +1851,7 @@ static int path_init(int dfd, const char *name, unsigned int flags,
18511851
int retval = 0;
18521852

18531853
nd->last_type = LAST_ROOT; /* if there are only slashes... */
1854-
nd->flags = flags | LOOKUP_JUMPED;
1854+
nd->flags = flags | LOOKUP_JUMPED | LOOKUP_PARENT;
18551855
nd->depth = 0;
18561856
nd->base = NULL;
18571857
if (flags & LOOKUP_ROOT) {
@@ -1983,7 +1983,7 @@ static int path_lookupat(int dfd, const char *name,
19831983
* be handled by restarting a traditional ref-walk (which will always
19841984
* be able to complete).
19851985
*/
1986-
err = path_init(dfd, name, flags | LOOKUP_PARENT, nd);
1986+
err = path_init(dfd, name, flags, nd);
19871987

19881988
if (unlikely(err))
19891989
goto out;
@@ -2329,7 +2329,7 @@ path_mountpoint(int dfd, const char *name, struct path *path, unsigned int flags
23292329
struct nameidata nd;
23302330
int err;
23312331

2332-
err = path_init(dfd, name, flags | LOOKUP_PARENT, &nd);
2332+
err = path_init(dfd, name, flags, &nd);
23332333
if (unlikely(err))
23342334
goto out;
23352335

@@ -3220,7 +3220,7 @@ static struct file *path_openat(int dfd, struct filename *pathname,
32203220
goto out;
32213221
}
32223222

3223-
error = path_init(dfd, pathname->name, flags | LOOKUP_PARENT, nd);
3223+
error = path_init(dfd, pathname->name, flags, nd);
32243224
if (unlikely(error))
32253225
goto out;
32263226

0 commit comments

Comments
 (0)