diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-06-25 21:59:52 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-20 01:44:03 -0400 |
commit | 49084c3bb2055c401f3493c13edae14d49128ca0 (patch) | |
tree | 354b13abe17f898bdcb24c11b961095f5023b832 /fs/namei.c | |
parent | 8aeb376ca0fe61038166c3b8243c678addb80abf (diff) |
kill LOOKUP_CONTINUE
LOOKUP_PARENT is equivalent to it now
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/namei.c b/fs/namei.c index 5e65f67ee926..f49d6abfa799 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -664,7 +664,7 @@ static int follow_automount(struct path *path, unsigned flags, | |||
664 | /* We don't want to mount if someone supplied AT_NO_AUTOMOUNT | 664 | /* We don't want to mount if someone supplied AT_NO_AUTOMOUNT |
665 | * and this is the terminal part of the path. | 665 | * and this is the terminal part of the path. |
666 | */ | 666 | */ |
667 | if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_CONTINUE)) | 667 | if ((flags & LOOKUP_NO_AUTOMOUNT) && !(flags & LOOKUP_PARENT)) |
668 | return -EISDIR; /* we actually want to stop here */ | 668 | return -EISDIR; /* we actually want to stop here */ |
669 | 669 | ||
670 | /* We want to mount if someone is trying to open/create a file of any | 670 | /* 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, | |||
676 | * appended a '/' to the name. | 676 | * appended a '/' to the name. |
677 | */ | 677 | */ |
678 | if (!(flags & LOOKUP_FOLLOW) && | 678 | if (!(flags & LOOKUP_FOLLOW) && |
679 | !(flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY | | 679 | !(flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY | |
680 | LOOKUP_OPEN | LOOKUP_CREATE))) | 680 | LOOKUP_OPEN | LOOKUP_CREATE))) |
681 | return -EISDIR; | 681 | return -EISDIR; |
682 | 682 | ||
@@ -695,7 +695,7 @@ static int follow_automount(struct path *path, unsigned flags, | |||
695 | * the path being looked up; if it wasn't then the remainder of | 695 | * the path being looked up; if it wasn't then the remainder of |
696 | * the path is inaccessible and we should say so. | 696 | * the path is inaccessible and we should say so. |
697 | */ | 697 | */ |
698 | if (PTR_ERR(mnt) == -EISDIR && (flags & LOOKUP_CONTINUE)) | 698 | if (PTR_ERR(mnt) == -EISDIR && (flags & LOOKUP_PARENT)) |
699 | return -EREMOTE; | 699 | return -EREMOTE; |
700 | return PTR_ERR(mnt); | 700 | return PTR_ERR(mnt); |
701 | } | 701 | } |
@@ -1281,7 +1281,6 @@ static int link_path_walk(const char *name, struct nameidata *nd) | |||
1281 | { | 1281 | { |
1282 | struct path next; | 1282 | struct path next; |
1283 | int err; | 1283 | int err; |
1284 | unsigned int lookup_flags = nd->flags; | ||
1285 | 1284 | ||
1286 | while (*name=='/') | 1285 | while (*name=='/') |
1287 | name++; | 1286 | name++; |
@@ -1295,8 +1294,6 @@ static int link_path_walk(const char *name, struct nameidata *nd) | |||
1295 | unsigned int c; | 1294 | unsigned int c; |
1296 | int type; | 1295 | int type; |
1297 | 1296 | ||
1298 | nd->flags |= LOOKUP_CONTINUE; | ||
1299 | |||
1300 | err = may_lookup(nd); | 1297 | err = may_lookup(nd); |
1301 | if (err) | 1298 | if (err) |
1302 | break; | 1299 | break; |
@@ -1358,8 +1355,6 @@ static int link_path_walk(const char *name, struct nameidata *nd) | |||
1358 | /* here ends the main loop */ | 1355 | /* here ends the main loop */ |
1359 | 1356 | ||
1360 | last_component: | 1357 | last_component: |
1361 | /* Clear LOOKUP_CONTINUE iff it was previously unset */ | ||
1362 | nd->flags &= lookup_flags | ~LOOKUP_CONTINUE; | ||
1363 | nd->last = this; | 1358 | nd->last = this; |
1364 | nd->last_type = type; | 1359 | nd->last_type = type; |
1365 | return 0; | 1360 | return 0; |