diff options
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/namei.c b/fs/namei.c index 36925ff307b3..5af7681e8ea3 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -682,6 +682,7 @@ static int do_lookup(struct nameidata *nd, struct qstr *name, | |||
682 | done: | 682 | done: |
683 | path->mnt = mnt; | 683 | path->mnt = mnt; |
684 | path->dentry = dentry; | 684 | path->dentry = dentry; |
685 | __follow_mount(path); | ||
685 | return 0; | 686 | return 0; |
686 | 687 | ||
687 | need_lookup: | 688 | need_lookup: |
@@ -789,8 +790,6 @@ static fastcall int __link_path_walk(const char * name, struct nameidata *nd) | |||
789 | err = do_lookup(nd, &this, &next); | 790 | err = do_lookup(nd, &this, &next); |
790 | if (err) | 791 | if (err) |
791 | break; | 792 | break; |
792 | /* Check mountpoints.. */ | ||
793 | __follow_mount(&next); | ||
794 | 793 | ||
795 | err = -ENOENT; | 794 | err = -ENOENT; |
796 | inode = next.dentry->d_inode; | 795 | inode = next.dentry->d_inode; |
@@ -850,7 +849,6 @@ last_component: | |||
850 | err = do_lookup(nd, &this, &next); | 849 | err = do_lookup(nd, &this, &next); |
851 | if (err) | 850 | if (err) |
852 | break; | 851 | break; |
853 | __follow_mount(&next); | ||
854 | inode = next.dentry->d_inode; | 852 | inode = next.dentry->d_inode; |
855 | if ((lookup_flags & LOOKUP_FOLLOW) | 853 | if ((lookup_flags & LOOKUP_FOLLOW) |
856 | && inode && inode->i_op && inode->i_op->follow_link) { | 854 | && inode && inode->i_op && inode->i_op->follow_link) { |