ldout(cct, 20) << " trying to trim dentries for " << *in << dendl;
bool all = true;
set<Dentry*>::iterator q = in->dn_set.begin();
+ in->get();
while (q != in->dn_set.end()) {
Dentry *dn = *q++;
if (dn->lru_is_expireable()) {
trim_dentry(dn);
+
} else {
ldout(cct, 20) << " not expirable: " << dn->name << dendl;
all = false;
ldout(cct, 20) << __func__ << " counting as trimmed: " << *in << dendl;
trimmed++;
}
+
+ put_inode(in);
}
++p;
}
s->s_cap_iterator = NULL;
+
// notify kernel to invalidate top level directory entries. As a side effect,
// unused inodes underneath these entries get pruned.
if (dentry_invalidate_cb && s->caps.size() > max) {