afs: Create afs_StaleVCache
[openafs.git] / src / afs / afs_segments.c
index 69f7445..9992a84 100644 (file)
@@ -526,12 +526,7 @@ afs_InvalidateAllSegments(struct vcache *avc)
     hash = DVHash(&avc->f.fid);
     avc->f.truncPos = AFS_NOTRUNC;     /* don't truncate later */
     avc->f.states &= ~CExtendedFile;   /* not any more */
-    ObtainWriteLock(&afs_xcbhash, 459);
-    afs_DequeueCallback(avc);
-    avc->f.states &= ~(CStatd | CDirty);       /* mark status information as bad, too */
-    ReleaseWriteLock(&afs_xcbhash);
-    if (avc->f.fid.Fid.Vnode & 1 || (vType(avc) == VDIR))
-       osi_dnlc_purgedp(avc);
+    afs_StaleVCacheFlags(avc, 0, CDirty);
     /* Blow away pages; for now, only for Solaris */
 #if    (defined(AFS_SUN5_ENV))
     if (WriteLocked(&avc->lock))