#elif defined(AFS_LINUX22_ENV)
if (tvc != afs_globalVp && VREFCOUNT(tvc) && tvc->opens == 0) {
#if defined(AFS_LINUX26_ENV)
- AFS_GUNLOCK();
- d_prune_aliases(AFSTOI(tvc));
- AFS_GLOCK();
+ struct dentry *dentry;
+ struct list_head *cur, *head = &(AFSTOI(tvc))->i_dentry;
+ AFS_GUNLOCK();
+ cur=head;
+ while ((cur = cur->next) != head) {
+ dentry = list_entry(cur, struct dentry, d_alias);
+ if (!d_unhashed(dentry) &&
+ !list_empty(&dentry->d_subdirs))
+ shrink_dcache_parent(dentry);
+ }
+ d_prune_aliases(AFSTOI(tvc));
+ AFS_GLOCK();
#else
afs_TryFlushDcacheChildren(tvc);
#endif