Skip to content

Commit

Permalink
path_init(): don't bother with LOOKUP_PARENT in argument
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Dec 11, 2014
1 parent 893b777 commit 980f3ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1851,7 +1851,7 @@ static int path_init(int dfd, const char *name, unsigned int flags,
int retval = 0;

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

if (unlikely(err))
goto out;
Expand Down Expand Up @@ -2329,7 +2329,7 @@ path_mountpoint(int dfd, const char *name, struct path *path, unsigned int flags
struct nameidata nd;
int err;

err = path_init(dfd, name, flags | LOOKUP_PARENT, &nd);
err = path_init(dfd, name, flags, &nd);
if (unlikely(err))
goto out;

Expand Down Expand Up @@ -3220,7 +3220,7 @@ static struct file *path_openat(int dfd, struct filename *pathname,
goto out;
}

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

Expand Down

0 comments on commit 980f3ea

Please sign in to comment.