]> git.baikalelectronics.ru Git - kernel.git/commit
autofs braino fix for do_last()
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 5 Jun 2016 04:23:09 +0000 (00:23 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 5 Jun 2016 04:23:09 +0000 (00:23 -0400)
commit0abb056f1e8bcefefe21b9bea72d75dfb8d1d46a
treed39790d5a1e2a78fbd76b0ea6082f1a8016fc195
parent4958da4ff4a779c78803c45b81157207296f4c71
autofs braino fix for do_last()

It's an analogue of commit 9e8297e0 (fix the braino in "namei:
massage lookup_slow() to be usable by lookup_one_len_unlocked()").
The same problem (->lookup()-returned unhashed negative dentry
just might be an autofs one with ->d_manage() that would wait
until the daemon makes it positive) applies in do_last() - we
need to do follow_managed() first.

Fortunately, remaining callers of follow_managed() are OK - only
autofs has that weirdness (negative dentry that does not mean
an instant -ENOENT)) and autofs never has its negative dentries
hashed, so we can't pick one from a dcache lookup.

->d_manage() is a bloody mess ;-/

Cc: stable@vger.kernel.org # v4.6
Spotted-by: Ian Kent <raven@themaw.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c