diff --git a/src/vol/vnode.c b/src/vol/vnode.c index ac922b595a..3e4b45df46 100644 --- a/src/vol/vnode.c +++ b/src/vol/vnode.c @@ -321,6 +321,7 @@ VAllocVnode_r(Error * ec, Volume * vp, VnodeType type) return NULL; vnodeNumber = bitNumberToVnodeNumber(bitNumber, class); + vnrehash: VNLog(2, 1, vnodeNumber); /* Prepare to move it to the new hash chain */ newHash = VNODE_HASH(vp, vnodeNumber); @@ -349,6 +350,10 @@ VAllocVnode_r(Error * ec, Volume * vp, VnodeType type) VOL_UNLOCK; ObtainWriteLock(&vnp->lock); VOL_LOCK; + if (vnp->volumePtr->cacheCheck != vnp->cacheCheck) { + ReleaseWriteLock(&vnp->lock); + goto vnrehash; + } } #ifdef AFS_PTHREAD_ENV vnp->writer = pthread_self();