diff --git a/[refs] b/[refs] index 9ef80a14a5a0..5cebcc65cf22 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: dea3937619cb67d2ad08e2d29ae923875b1eeee9 +refs/heads/master: d6e9bd256c88ce5f4b668249e363a74f51393daa diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 988081424098..1ab641f2e78e 100644 --- a/trunk/fs/namei.c +++ b/trunk/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;