From: Derrick Brashear Date: Mon, 20 Aug 2007 18:53:15 +0000 (+0000) Subject: STABLE14-find-dcache-just-hold-the-lock-slightly-longer-20070820 X-Git-Tag: openafs-stable-1_4_5-pre1~22 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=17f61220e2e5565b86defc806c02934686bf97cc;p=packages%2Fo%2Fopenafs.git STABLE14-find-dcache-just-hold-the-lock-slightly-longer-20070820 we go out of our way to hold xdcache to protect indexTimes elsewhere... there's no reason to drop it here just before this... (cherry picked from commit d0a92c7bdeeac96a0d09e02a1494ff398f57f1bb) --- diff --git a/src/afs/afs_dcache.c b/src/afs/afs_dcache.c index df04a5a5f..b4101852b 100644 --- a/src/afs/afs_dcache.c +++ b/src/afs/afs_dcache.c @@ -1201,14 +1201,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 */