diff --git a/fs/dcache.c b/fs/dcache.c index 3cf6fadd5550ed800dd28cad193d0236ec293b79..cc5ba31d9b95afb2fc6dbbd3276ef745546478c2 100644 --- a/fs/dcache.c +++ b/fs/dcache.c @@ -654,6 +654,10 @@ static inline bool limit_negative_dentry(struct dentry *dentry) { struct dentry *parent; + /* The dentry is now unrecoverably dead, shuoldn't limit */ + if (unlikely(dentry->d_lockref.count < 0)) + return false; + parent = dentry->d_parent; if (unlikely(!parent)) return false;