X-Git-Url: https://git.openafs.org/?p=openafs.git;a=blobdiff_plain;f=src%2FWINNT%2Fafsd%2Fcm_scache.c;h=1745e6d706ac69d605d93d346668b90c1d3e96a0;hp=a2432b5fd1ad9f30f47bfcddc8a70e7c12c5814f;hb=6e26922f68d2b0f692212e6150d7955a0d393929;hpb=05ecdb353a7c960a34133002a388889e9882d946 diff --git a/src/WINNT/afsd/cm_scache.c b/src/WINNT/afsd/cm_scache.c index a2432b5..1745e6d 100644 --- a/src/WINNT/afsd/cm_scache.c +++ b/src/WINNT/afsd/cm_scache.c @@ -373,15 +373,22 @@ cm_GetNewSCache(afs_uint32 locked) fileType = scp->fileType; if (!cm_RecycleSCache(scp, 0)) { - /* we found an entry, so return it. - * remove from the LRU queue and put it back at the - * head of the LRU queue. - */ - cm_AdjustScacheLRU(scp); - - /* and we're done - SUCCESS */ - osi_assertx(!(scp->flags & CM_SCACHEFLAG_INHASH), "CM_SCACHEFLAG_INHASH set"); - goto done; + if (!(scp->flags & CM_SCACHEFLAG_INHASH)) { + /* we found an entry, so return it. + * remove from the LRU queue and put it back at the + * head of the LRU queue. + */ + cm_AdjustScacheLRU(scp); + + /* and we're done - SUCCESS */ + goto done; + } + + /* + * Something went wrong. Could we have raced with another thread? + * Instead of panicking, just skip it. + */ + osi_Log1(afsd_logp, "GetNewSCache cm_RecycleSCache returned in hash scp 0x%p", scp); } lock_ReleaseWrite(&scp->rw); } else {