--- a/fs/dcache.c +++ b/fs/dcache.c @@ -949,6 +949,14 @@ static void shrink_dentry_list(struct li spin_unlock(&parent->d_lock); continue; } + if (inode && (inode->i_state & I_CLEAR)) { + spin_unlock(&inode->i_lock); + d_shrink_add(dentry, list); + spin_unlock(&dentry->d_lock); + if (parent) + spin_unlock(&parent->d_lock); + continue; + } __dentry_kill(dentry);