/* Check that the vnode hasn't been removed while we were obtaining
the lock */
VNLog(102, 2, vnodeNumber, (afs_int32) vnp);
- if (vnp->disk.type == vNull) {
+ if ((vnp->disk.type == vNull) || (vnp->cacheCheck == 0)){
if (vnp->nUsers-- == 1)
StickOnLruChain_r(vnp,vcp);
if (locktype == READ_LOCK)
struct Volume
*volumePtr; /* Pointer to the volume containing this file*/
byte nUsers; /* Number of lwp's who have done a VGetVnode */
- bit16 cacheCheck; /* Must equal the value in the volume Header
+ bit32 cacheCheck; /* Must equal the value in the volume Header
for the cache entry to be valid */
struct Lock lock; /* Internal lock */
#ifdef AFS_PTHREAD_ENV
IH_INIT(vp->linkHandle, partp->device, header->parent,
header->linkTable);
vp->cacheCheck = ++VolumeCacheCheck;
+ /* just in case this ever rolls over */
+ if (!vp->cacheCheck)
+ vp->cacheCheck = ++VolumeCacheCheck;
vp->shuttingDown = 0;
vp->goingOffline = 0;
vp->nUsers = 1;
Added to vnode number for hash table index */
byte shuttingDown; /* This volume is going to be detached */
byte goingOffline; /* This volume is going offline */
- bit16 cacheCheck; /* Online sequence number to be used to invalidate vnode cache entries
+ bit32 cacheCheck; /* Online sequence number to be used to invalidate vnode cache entries
that stayed around while a volume was offline */
short nUsers; /* Number of users of this volume header */
byte needsPutBack; /* For a volume utility, this flag is set if we need