mirror of
https://git.openafs.org/openafs.git
synced 2025-01-19 23:40:13 +00:00
Windows: validate buffer hash tables in cm_MergeStatus
Change-Id: I1ff76513e9f2ba08bdeb988a19fec992b08310db Reviewed-on: http://gerrit.openafs.org/5425 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
This commit is contained in:
parent
febbd0f1ae
commit
cf57eb294f
@ -888,7 +888,7 @@ void buf_Recycle(cm_buf_t *bp)
|
|||||||
|
|
||||||
i = BUF_HASH(&bp->fid, &bp->offset);
|
i = BUF_HASH(&bp->fid, &bp->offset);
|
||||||
lbpp = &(cm_data.buf_scacheHashTablepp[i]);
|
lbpp = &(cm_data.buf_scacheHashTablepp[i]);
|
||||||
for(tbp = *lbpp; tbp; lbpp = &tbp->hashp, tbp = *lbpp) {
|
for(tbp = *lbpp; tbp; lbpp = &tbp->hashp, tbp = tbp->hashp) {
|
||||||
if (tbp == bp)
|
if (tbp == bp)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1646,11 +1646,14 @@ void cm_MergeStatus(cm_scache_t *dscp,
|
|||||||
|
|
||||||
j = BUF_HASH(&bp->fid, &bp->offset);
|
j = BUF_HASH(&bp->fid, &bp->offset);
|
||||||
lbpp = &(cm_data.buf_scacheHashTablepp[j]);
|
lbpp = &(cm_data.buf_scacheHashTablepp[j]);
|
||||||
for(tbp = *lbpp; tbp; lbpp = &tbp->hashp, tbp = *lbpp) {
|
for(tbp = *lbpp; tbp; lbpp = &tbp->hashp, tbp = tbp->hashp) {
|
||||||
if (tbp == bp)
|
if (tbp == bp)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* we better find it */
|
||||||
|
osi_assertx(tbp != NULL, "cm_MergeStatus: buf_scacheHashTablepp table screwup");
|
||||||
|
|
||||||
*lbpp = bp->hashp; /* hash out */
|
*lbpp = bp->hashp; /* hash out */
|
||||||
bp->hashp = NULL;
|
bp->hashp = NULL;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user