Skip to contentSkip to conversation

autofs lookup fails with -ENOENT

regression 4.6-rc1 Junichi Nomura 1 participant 1 message Mar 29, 2016 VFS

lore
Share & tools
lore
#0 lore raw

Lookup of autofs files starts failing with -ENOENT on 4.6-rc1.

git-bisect tells commit e3c13928086f1 "namei: massage lookup_slow() to be usable by lookup_one_len_unlocked()" as the first bad commit.

With the change, walk_component() does this:

    path.dentry = lookup_slow(&nd->last, nd->path.dentry,
                                          nd->flags);
    if (IS_ERR(path.dentry))
            return PTR_ERR(path.dentry);
    if (unlikely(d_is_negative(path.dentry))) {
            dput(path.dentry);
            return -ENOENT;
    }
    path.mnt = nd->path.mnt;
    err = follow_managed(&path, nd);
    if (unlikely(err < 0))
            return err;

It returns -ENOENT before handling automount in follow_managed(). Shouldn't it call follow_managed() before checking d_is_negative()?

--
Jun'ichi Nomura, NEC Corporation