]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-disconnected-getvcache-avoid-duplicate-work-20081012
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Sun, 12 Oct 2008 19:07:01 +0000 (19:07 +0000)
committerDerrick Brashear <shadow@dementia.org>
Sun, 12 Oct 2008 19:07:01 +0000 (19:07 +0000)
LICENSE IPL10
FIXES 121254

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

(cherry picked from commit 7c6fac305c81af3e10f48560c03db4d2da630527)

src/afs/afs_vcache.c

index 12bf2f0cda61611a7420f07efb1d41028069b7f3..c95060580e3b1eb40fdb37d8623ac767384c0641 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;