]> git.baikalelectronics.ru Git - kernel.git/commit
dcache: Don't set DISCONNECTED on "pseudo filesystem" dentries
authorJ. Bruce Fields <bfields@redhat.com>
Fri, 29 Jun 2012 20:20:47 +0000 (16:20 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 9 Nov 2013 05:16:33 +0000 (00:16 -0500)
commit009c1e9b306699bb66411f2f19965a2c364c0fbb
tree04c1731bae6e7812ed30cb2097c391ae469d3ef7
parent0456dd9d7384e10146fcd0982516a88b196dfc5a
dcache: Don't set DISCONNECTED on "pseudo filesystem" dentries

I can't for the life of me see any reason why anyone should care whether
a dentry that is never hooked into the dentry cache would need
DCACHE_DISCONNECTED set.

This originates from 91d95590fea08a73d77c7da783ce05242c347918 "fs:
improve scalability of pseudo filesystems", which probably just made the
false assumption the DCACHE_DISCONNECTED was meant to be set on anything
not connected to a parent somehow.

So this is just confusing.  Ideally the only uses of DCACHE_DISCONNECTED
would be in the filehandle-lookup code, which needs it to ensure
dentries are connected into the dentry tree before use.

I left d_alloc_pseudo there even though it's now equivalent to
__d_alloc(), just on the theory the name is better documentation of its
intended use outside dcache.c.

Cc: Nick Piggin <npiggin@kernel.dk>
Acked-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/dcache.c