Commit d6e9bd25 authored by Al Viro's avatar Al Viro

Lift the check for automount points into do_lookup()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent dea39376
...@@ -945,9 +945,6 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path, ...@@ -945,9 +945,6 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path,
path->dentry = mounted->mnt_root; path->dentry = mounted->mnt_root;
nd->seq = read_seqcount_begin(&path->dentry->d_seq); nd->seq = read_seqcount_begin(&path->dentry->d_seq);
} }
if (unlikely(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT))
return false;
return true; return true;
} }
...@@ -1164,7 +1161,10 @@ static int do_lookup(struct nameidata *nd, struct qstr *name, ...@@ -1164,7 +1161,10 @@ static int do_lookup(struct nameidata *nd, struct qstr *name,
} }
path->mnt = mnt; path->mnt = mnt;
path->dentry = dentry; path->dentry = dentry;
if (likely(__follow_mount_rcu(nd, path, inode))) if (unlikely(!__follow_mount_rcu(nd, path, inode)))
goto unlazy;
if (unlikely(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT))
goto unlazy;
return 0; return 0;
unlazy: unlazy:
if (unlazy_walk(nd, dentry)) if (unlazy_walk(nd, dentry))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment