linux-26-vlru-cycle-20041012
authorChaskiel M Grundman <cg2v@andrew.cmu.edu>
Wed, 13 Oct 2004 01:36:59 +0000 (01:36 +0000)
committerDerrick Brashear <shadow@dementia.org>
Wed, 13 Oct 2004 01:36:59 +0000 (01:36 +0000)
FIXES 15339

it was only a matter of time...

src/afs/afs_vcache.c

index 87c467f..249e272 100644 (file)
@@ -840,9 +840,18 @@ afs_NewVCache(struct VenusFid *afid, struct server *serverp)
 #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