kill LOOKUP_CONTINUE
LOOKUP_PARENT is equivalent to it now Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
8aeb376ca0
commit
49084c3bb2
11
fs/namei.c
11
fs/namei.c
|
@ -664,7 +664,7 @@ static int follow_automount(struct path *path, unsigned flags,
|
||||||
/* We don't want to mount if someone supplied AT_NO_AUTOMOUNT
|
/* We don't want to mount if someone supplied AT_NO_AUTOMOUNT
|
||||||
* and this is the terminal part of the path.
|
* and this is the terminal part of the path.
|
||||||
*/
|
*/
|
||||||
if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_CONTINUE))
|
if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_PARENT))
|
||||||
return -EISDIR; /* we actually want to stop here */
|
return -EISDIR; /* we actually want to stop here */
|
||||||
|
|
||||||
/* We want to mount if someone is trying to open/create a file of any
|
/* We want to mount if someone is trying to open/create a file of any
|
||||||
|
@ -676,7 +676,7 @@ static int follow_automount(struct path *path, unsigned flags,
|
||||||
* appended a '/' to the name.
|
* appended a '/' to the name.
|
||||||
*/
|
*/
|
||||||
if (!(flags & LOOKUP_FOLLOW) &&
|
if (!(flags & LOOKUP_FOLLOW) &&
|
||||||
!(flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY |
|
!(flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY |
|
||||||
LOOKUP_OPEN | LOOKUP_CREATE)))
|
LOOKUP_OPEN | LOOKUP_CREATE)))
|
||||||
return -EISDIR;
|
return -EISDIR;
|
||||||
|
|
||||||
|
@ -695,7 +695,7 @@ static int follow_automount(struct path *path, unsigned flags,
|
||||||
* the path being looked up; if it wasn't then the remainder of
|
* the path being looked up; if it wasn't then the remainder of
|
||||||
* the path is inaccessible and we should say so.
|
* the path is inaccessible and we should say so.
|
||||||
*/
|
*/
|
||||||
if (PTR_ERR(mnt) == -EISDIR && (flags & LOOKUP_CONTINUE))
|
if (PTR_ERR(mnt) == -EISDIR && (flags & LOOKUP_PARENT))
|
||||||
return -EREMOTE;
|
return -EREMOTE;
|
||||||
return PTR_ERR(mnt);
|
return PTR_ERR(mnt);
|
||||||
}
|
}
|
||||||
|
@ -1281,7 +1281,6 @@ static int link_path_walk(const char *name, struct nameidata *nd)
|
||||||
{
|
{
|
||||||
struct path next;
|
struct path next;
|
||||||
int err;
|
int err;
|
||||||
unsigned int lookup_flags = nd->flags;
|
|
||||||
|
|
||||||
while (*name=='/')
|
while (*name=='/')
|
||||||
name++;
|
name++;
|
||||||
|
@ -1295,8 +1294,6 @@ static int link_path_walk(const char *name, struct nameidata *nd)
|
||||||
unsigned int c;
|
unsigned int c;
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
nd->flags |= LOOKUP_CONTINUE;
|
|
||||||
|
|
||||||
err = may_lookup(nd);
|
err = may_lookup(nd);
|
||||||
if (err)
|
if (err)
|
||||||
break;
|
break;
|
||||||
|
@ -1358,8 +1355,6 @@ static int link_path_walk(const char *name, struct nameidata *nd)
|
||||||
/* here ends the main loop */
|
/* here ends the main loop */
|
||||||
|
|
||||||
last_component:
|
last_component:
|
||||||
/* Clear LOOKUP_CONTINUE iff it was previously unset */
|
|
||||||
nd->flags &= lookup_flags | ~LOOKUP_CONTINUE;
|
|
||||||
nd->last = this;
|
nd->last = this;
|
||||||
nd->last_type = type;
|
nd->last_type = type;
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -48,7 +48,6 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
|
||||||
*/
|
*/
|
||||||
#define LOOKUP_FOLLOW 0x0001
|
#define LOOKUP_FOLLOW 0x0001
|
||||||
#define LOOKUP_DIRECTORY 0x0002
|
#define LOOKUP_DIRECTORY 0x0002
|
||||||
#define LOOKUP_CONTINUE 0x0004
|
|
||||||
|
|
||||||
#define LOOKUP_PARENT 0x0010
|
#define LOOKUP_PARENT 0x0010
|
||||||
#define LOOKUP_REVAL 0x0020
|
#define LOOKUP_REVAL 0x0020
|
||||||
|
|
Loading…
Reference in New Issue