]> git.baikalelectronics.ru Git - kernel.git/commit
vfs: remove unnecessary d_unhashed() check from __d_lookup_rcu
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 10 May 2012 18:06:18 +0000 (11:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 11 May 2012 02:52:35 +0000 (19:52 -0700)
commitdede9ba19339fbe679b7f56edf06660f3f813b60
tree933b5a95604674d0534b0290d8c3633425989f62
parent85f60c7d44e1898e95c3c64eab85d3062a9bbcb3
vfs: remove unnecessary d_unhashed() check from __d_lookup_rcu

The check for d_unhashed() is not strictly incorrect, but at the same
time it is also not sensible.  The actual dentry removal from the dentry
hash chains is totally asynchronous to the __d_lookup_rcu() logic, and
we depend on __d_drop() updating the sequence number to invalidate any
lookup of an unhashed dentry.

So checking d_unhashed() is not incorrect, but it's not useful either:
the code has to work correctly even without it. So just remove it.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/dcache.c