disconnected-getvcache-avoid-duplicate-work-20081012
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Sun, 12 Oct 2008 19:06:27 +0000 (19:06 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 12 Oct 2008 19:06:27 +0000 (19:06 +0000)
LICENSE IPL10
FIXES 121254

don't do duplicate work finding a vcache we already had

src/afs/afs_vcache.c

index 12bf2f0..c950605 100644 (file)
@@ -2021,12 +2021,7 @@ afs_GetVCache(register struct VenusFid *afid, struct vrequest *areq,
 
            if (AFS_IS_DISCONNECTED) {
                if (AFS_IS_DISCON_RW) {
-                   /* Seek the vnode manually. */
-                   ObtainSharedLock(&afs_xvcache, 738);
-                   avc = afs_FindVCache(afid, NULL, 1);
-                   ReleaseSharedLock(&afs_xvcache);
-
-                   if (vType(avc) == VDIR)
+                   if (vType(tvc) == VDIR)
                        OutStatus.FileType = Directory;
 
                    code = tvc?0:ENOENT;