From 8efaec26038fdf48cc459dd323c1b555c99a1c46 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sat, 25 Jun 2011 21:59:52 -0400 Subject: [PATCH] --- yaml --- r: 257343 b: refs/heads/master c: 49084c3bb2055c401f3493c13edae14d49128ca0 h: refs/heads/master i: 257341: 33a9685a09ba048d7f8866a9e7d59da0484838a1 257339: b9fdf0b9531f24467a26ce98c5067c513241d181 257335: 99f6bb4bc2f06d7d89081d100ca6499aad286f69 257327: 9d36d2793267f72ab99e2c9fa6eb8d091e38c91e 257311: 50c208cae2b9084b3a24aa605008be7504e7c000 257279: 0a5d2c523cb36e38b8626c23563954c279457f04 v: v3 --- [refs] | 2 +- trunk/fs/namei.c | 11 +++-------- trunk/include/linux/namei.h | 1 - 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index c39e92060edb..638a83d01966 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8aeb376ca0fe61038166c3b8243c678addb80abf +refs/heads/master: 49084c3bb2055c401f3493c13edae14d49128ca0 diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 5e65f67ee926..f49d6abfa799 100644 --- a/trunk/fs/namei.c +++ b/trunk/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 * 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 */ /* 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. */ if (!(flags & LOOKUP_FOLLOW) && - !(flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY | + !(flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY | LOOKUP_OPEN | LOOKUP_CREATE))) 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 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 PTR_ERR(mnt); } @@ -1281,7 +1281,6 @@ static int link_path_walk(const char *name, struct nameidata *nd) { struct path next; int err; - unsigned int lookup_flags = nd->flags; while (*name=='/') name++; @@ -1295,8 +1294,6 @@ static int link_path_walk(const char *name, struct nameidata *nd) unsigned int c; int type; - nd->flags |= LOOKUP_CONTINUE; - err = may_lookup(nd); if (err) break; @@ -1358,8 +1355,6 @@ static int link_path_walk(const char *name, struct nameidata *nd) /* here ends the main loop */ last_component: - /* Clear LOOKUP_CONTINUE iff it was previously unset */ - nd->flags &= lookup_flags | ~LOOKUP_CONTINUE; nd->last = this; nd->last_type = type; return 0; diff --git a/trunk/include/linux/namei.h b/trunk/include/linux/namei.h index eba45ea10298..3439ab862e1d 100644 --- a/trunk/include/linux/namei.h +++ b/trunk/include/linux/namei.h @@ -48,7 +48,6 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND}; */ #define LOOKUP_FOLLOW 0x0001 #define LOOKUP_DIRECTORY 0x0002 -#define LOOKUP_CONTINUE 0x0004 #define LOOKUP_PARENT 0x0010 #define LOOKUP_REVAL 0x0020