Skip to content

Commit

Permalink
Lift the check for automount points into do_lookup()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed May 27, 2011
1 parent dea3937 commit d6e9bd2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit d6e9bd2

Please sign in to comment.