]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
find-dcache-just-hold-the-lock-slightly-longer-20070820
authorDerrick Brashear <shadow@dementia.org>
Mon, 20 Aug 2007 18:50:16 +0000 (18:50 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 20 Aug 2007 18:50:16 +0000 (18:50 +0000)
we go out of our way to hold xdcache to protect indexTimes elsewhere... there's
no reason to drop it here just before this...

src/afs/afs_dcache.c

index d316848c4ca0f3a1477e3ada54b6b44aceb243ed..5d7c2d6880bc7fbc5914185fc824f86a6480037b 100644 (file)
@@ -1345,14 +1345,14 @@ afs_FindDCache(register struct vcache *avc, afs_size_t abyte)
        }
        index = afs_dcnextTbl[index];
     }
-    MReleaseWriteLock(&afs_xdcache);
     if (index != NULLIDX) {
        hset(afs_indexTimes[tdc->index], afs_indexCounter);
        hadd32(afs_indexCounter, 1);
+       MReleaseWriteLock(&afs_xdcache);
        return tdc;
-    } else
-       return NULL;
-
+    } 
+    MReleaseWriteLock(&afs_xdcache);
+    return NULL;
 }                              /*afs_FindDCache */