aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-10 14:06:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-10 22:52:35 -0400
commit8c01a529b861ba97c7d78368e6a5d4d42e946f75 (patch)
tree933b5a95604674d0534b0290d8c3633425989f62 /fs/dcache.c
parent12f8ad4b0533d9212cb1d5e58ed73d2170114785 (diff)
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>
Diffstat (limited to 'fs/dcache.c')
-rw-r--r--fs/dcache.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/dcache.c b/fs/dcache.c
index 539943eb442c..c4d2ff8b4912 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1871,8 +1871,6 @@ seqretry:
1871 seq = raw_seqcount_begin(&dentry->d_seq); 1871 seq = raw_seqcount_begin(&dentry->d_seq);
1872 if (dentry->d_parent != parent) 1872 if (dentry->d_parent != parent)
1873 continue; 1873 continue;
1874 if (d_unhashed(dentry))
1875 continue;
1876 *seqp = seq; 1874 *seqp = seq;
1877 1875
1878 if (unlikely(parent->d_flags & DCACHE_OP_COMPARE)) { 1876 if (unlikely(parent->d_flags & DCACHE_OP_COMPARE)) {