diff --git a/fs/dcache.c b/fs/dcache.c index a7675e0109f08fa5c9c153172411c7863655a0c3..8c1ab8fb501228e082c04160fbc69aaeafd3cbee 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -1877,6 +1877,8 @@ struct dentry *__d_lookup_rcu(const struct dentry *parent, seq = raw_seqcount_begin(&dentry->d_seq); if (dentry->d_parent != parent) continue; + if (d_unhashed(dentry)) + continue; *seqp = seq; if (unlikely(parent->d_flags & DCACHE_OP_COMPARE)) {