cm_cell_t* cellp = NULL;
afs_uint32 hash;
int discarded;
+ cm_fid_t discardFid;
+ afs_uint32 discardType;
struct rx_connection *connp;
struct rx_peer *peerp;
unsigned long host = 0;
if (cm_ServerEqual(scp->cbServerp, tsp)) {
osi_Log4(afsd_logp, "InitCallbackState3 Discarding SCache scp 0x%p vol %u vn %u uniq %u",
scp, scp->fid.volume, scp->fid.vnode, scp->fid.unique);
+ discardFid = scp->fid;
+ discardType = scp->fileType;
cm_DiscardSCache(scp);
discarded = 1;
}
if (discarded) {
cm_CallbackNotifyChange(scp);
if (RDR_Initialized)
- RDR_InvalidateObject(scp->fid.cell, scp->fid.volume, scp->fid.vnode, scp->fid.unique,
- scp->fid.hash, scp->fileType, AFS_INVALIDATE_EXPIRED);
+ RDR_InvalidateObject(discardFid.cell, discardFid.volume, discardFid.vnode, discardFid.unique,
+ discardFid.hash, discardType, AFS_INVALIDATE_EXPIRED);
}
lock_ObtainWrite(&cm_scacheLock);
cm_ReleaseSCacheNoLock(scp);
if (RDR_Initialized)
RDR_InvalidateObject(scp->fid.cell, scp->fid.volume, scp->fid.vnode, scp->fid.unique,
- scp->fid.hash, scp->fileType, AFS_INVALIDATE_EXPIRED);
+ scp->fid.hash, scp->fileType, AFS_INVALIDATE_EXPIRED);
cm_CallbackNotifyChange(scp);
/* called with cm_scacheLock and scp write-locked; recycles an existing scp. */
long cm_RecycleSCache(cm_scache_t *scp, afs_int32 flags)
{
+ cm_fid_t fid;
+ afs_uint32 fileType;
+ int callback;
+
lock_AssertWrite(&cm_scacheLock);
lock_AssertWrite(&scp->rw);
return -1;
}
+
if (scp->flags & CM_SCACHEFLAG_SMB_FID) {
osi_Log1(afsd_logp,"cm_RecycleSCache CM_SCACHEFLAG_SMB_FID detected scp 0x%p", scp);
#ifdef DEBUG
return -1;
}
+ fid = scp->fid;
+ fileType = scp->fileType;
+ callback = scp->cbExpires ? 1 : 0;
+
cm_RemoveSCacheFromHashTable(scp);
/* invalidate so next merge works fine;
cm_FreeAllACLEnts(scp);
cm_ResetSCacheDirectory(scp, 0);
+
+ if (RDR_Initialized && callback) {
+ /*
+ * We drop the cm_scacheLock because it may be required to
+ * satisfy an ioctl request from the redirector. It should
+ * be safe to hold the scp->rw lock here because at this
+ * point (a) the object has just been recycled so the fid
+ * is nul and there are no requests that could possibly
+ * be issued by the redirector that would depend upon it.
+ */
+ lock_ReleaseWrite(&cm_scacheLock);
+ RDR_InvalidateObject( fid.cell, fid.volume, fid.vnode,
+ fid.unique, fid.hash,
+ fileType, AFS_INVALIDATE_EXPIRED);
+ lock_ObtainWrite(&cm_scacheLock);
+ }
+
return 0;
}
*/
cm_AdjustScacheLRU(scp);
- if (RDR_Initialized) {
- /*
- * We drop the cm_scacheLock because it may be required to
- * satisfy an ioctl request from the redirector. It should
- * be safe to hold the scp->rw lock here because at this
- * point (a) the object has just been recycled so the fid
- * is nul and there are no requests that could possibly
- * be issued by the redirector that would depend upon it.
- */
- lock_ReleaseWrite(&cm_scacheLock);
- RDR_InvalidateObject( fid.cell, fid.volume, fid.vnode,
- fid.unique, fid.hash,
- fileType, AFS_INVALIDATE_EXPIRED);
- lock_ObtainWrite(&cm_scacheLock);
- }
-
/* and we're done */
osi_assertx(!(scp->flags & CM_SCACHEFLAG_INHASH), "CM_SCACHEFLAG_INHASH set");
goto done;