if (code) {
if (code < 0) {
- ObtainWriteLock(&afs_xcbhash, 488);
- afs_DequeueCallback(adp);
- adp->f.states &= ~CStatd;
- ReleaseWriteLock(&afs_xcbhash);
- osi_dnlc_purgedp(adp);
+ afs_StaleVCache(adp);
}
ReleaseWriteLock(&adp->lock);
if (tdc) {
afs_QueueCallback(tvc, CBHash(CallBack.ExpirationTime), volp);
}
} else {
- afs_DequeueCallback(tvc);
- tvc->f.states &= ~(CStatd | CUnique);
- tvc->callback = 0;
- if (tvc->f.fid.Fid.Vnode & 1 || (vType(tvc) == VDIR))
- osi_dnlc_purgedp(tvc);
+ afs_StaleVCacheFlags(tvc,
+ AFS_STALEVC_CBLOCKED | AFS_STALEVC_CLEARCB,
+ CUnique);
}
ReleaseWriteLock(&afs_xcbhash);
if (AFS_IS_DISCON_RW) {
/* The bulk status code used the length as a sequence number. */
/* Don't update the vcache entry unless the stats are current. */
if (avc->f.states & CStatd) {
- hset(avc->f.m.DataVersion, avers);
+ afs_SetDataVersion(avc, &avers);
#ifdef AFS_64BIT_CLIENT
FillInt64(avc->f.m.Length, astat->Length_hi, astat->Length);
#else /* AFS_64BIT_CLIENT */