diff options
| -rw-r--r-- | fs/namei.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c index 7ac9fb4acb2c..b760e1e18b48 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
| @@ -790,7 +790,7 @@ static fastcall int __link_path_walk(const char * name, struct nameidata *nd) | |||
| 790 | 790 | ||
| 791 | inode = nd->dentry->d_inode; | 791 | inode = nd->dentry->d_inode; |
| 792 | if (nd->depth) | 792 | if (nd->depth) |
| 793 | lookup_flags = LOOKUP_FOLLOW; | 793 | lookup_flags = LOOKUP_FOLLOW | (nd->flags & LOOKUP_CONTINUE); |
| 794 | 794 | ||
| 795 | /* At this point we know we have a real path component. */ | 795 | /* At this point we know we have a real path component. */ |
| 796 | for(;;) { | 796 | for(;;) { |
| @@ -885,7 +885,8 @@ static fastcall int __link_path_walk(const char * name, struct nameidata *nd) | |||
| 885 | last_with_slashes: | 885 | last_with_slashes: |
| 886 | lookup_flags |= LOOKUP_FOLLOW | LOOKUP_DIRECTORY; | 886 | lookup_flags |= LOOKUP_FOLLOW | LOOKUP_DIRECTORY; |
| 887 | last_component: | 887 | last_component: |
| 888 | nd->flags &= ~LOOKUP_CONTINUE; | 888 | /* Clear LOOKUP_CONTINUE iff it was previously unset */ |
| 889 | nd->flags &= lookup_flags | ~LOOKUP_CONTINUE; | ||
| 889 | if (lookup_flags & LOOKUP_PARENT) | 890 | if (lookup_flags & LOOKUP_PARENT) |
| 890 | goto lookup_parent; | 891 | goto lookup_parent; |
| 891 | if (this.name[0] == '.') switch (this.len) { | 892 | if (this.name[0] == '.') switch (this.len) { |
