mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
Lift the check for automount points into do_lookup()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
dea3937619
commit
d6e9bd256c
10
fs/namei.c
10
fs/namei.c
@ -945,9 +945,6 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path,
|
||||
path->dentry = mounted->mnt_root;
|
||||
nd->seq = read_seqcount_begin(&path->dentry->d_seq);
|
||||
}
|
||||
|
||||
if (unlikely(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -1164,8 +1161,11 @@ static int do_lookup(struct nameidata *nd, struct qstr *name,
|
||||
}
|
||||
path->mnt = mnt;
|
||||
path->dentry = dentry;
|
||||
if (likely(__follow_mount_rcu(nd, path, inode)))
|
||||
return 0;
|
||||
if (unlikely(!__follow_mount_rcu(nd, path, inode)))
|
||||
goto unlazy;
|
||||
if (unlikely(path->dentry->d_flags & DCACHE_NEED_AUTOMOUNT))
|
||||
goto unlazy;
|
||||
return 0;
|
||||
unlazy:
|
||||
if (unlazy_walk(nd, dentry))
|
||||
return -ECHILD;
|
||||
|
Loading…
Reference in New Issue
Block a user