]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-vnrehash-avoid-cachecheck-change-20050618
authorDerrick Brashear <shadow@dementia.org>
Thu, 28 Jul 2005 22:11:19 +0000 (22:11 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 28 Jul 2005 22:11:19 +0000 (22:11 +0000)
unlocking and locking lets us race and makes cacheCheck potentially go bad

src/vol/vnode.c

index 7f4876bbce8ec48f101ce0d7b27ffaf4ecea0c27..3e4b45df46c3857ae708cbb4513e3e02c30d9993 100644 (file)
@@ -350,8 +350,10 @@ VAllocVnode_r(Error * ec, Volume * vp, VnodeType type)
            VOL_UNLOCK;
            ObtainWriteLock(&vnp->lock);
            VOL_LOCK;
-           if (vnp->volumePtr->cacheCheck != vnp->cacheCheck)
+           if (vnp->volumePtr->cacheCheck != vnp->cacheCheck) {
+               ReleaseWriteLock(&vnp->lock);
                goto vnrehash;
+           }
        }
 #ifdef AFS_PTHREAD_ENV
        vnp->writer = pthread_self();