diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-05-27 07:03:15 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-05-27 07:03:15 -0400 |
commit | d6e9bd256c88ce5f4b668249e363a74f51393daa (patch) | |
tree | 87c70fb00c36164136fbdc0eb2daf3dbe79c80b1 | |
parent | dea3937619cb67d2ad08e2d29ae923875b1eeee9 (diff) |
Lift the check for automount points into do_lookup()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | fs/namei.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c index 988081424098..1ab641f2e78e 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -945,9 +945,6 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path, | |||
945 | path->dentry = mounted->mnt_root; | 945 | path->dentry = mounted->mnt_root; |
946 | nd->seq = read_seqcount_begin(&path->dentry->d_seq); | 946 | nd->seq = read_seqcount_begin(&path->dentry->d_seq); |
947 | } | 947 | } |
948 | |||
949 | if (unlikely(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT)) | ||
950 | return false; | ||
951 | return true; | 948 | return true; |
952 | } | 949 | } |
953 | 950 | ||
@@ -1164,8 +1161,11 @@ static int do_lookup(struct nameidata *nd, struct qstr *name, | |||
1164 | } | 1161 | } |
1165 | path->mnt = mnt; | 1162 | path->mnt = mnt; |
1166 | path->dentry = dentry; | 1163 | path->dentry = dentry; |
1167 | if (likely(__follow_mount_rcu(nd, path, inode))) | 1164 | if (unlikely(!__follow_mount_rcu(nd, path, inode))) |
1168 | return 0; | 1165 | goto unlazy; |
1166 | if (unlikely(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT)) | ||
1167 | goto unlazy; | ||
1168 | return 0; | ||
1169 | unlazy: | 1169 | unlazy: |
1170 | if (unlazy_walk(nd, dentry)) | 1170 | if (unlazy_walk(nd, dentry)) |
1171 | return -ECHILD; | 1171 | return -ECHILD; |