From: Jeffrey Altman Date: Fri, 28 Oct 2011 15:36:10 +0000 (-0400) Subject: Windows: out of date version not in current chunk X-Git-Tag: upstream/1.8.0_pre1^2~3115 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1dad690fc34fdd8d9df8a3be6d580441b7cae8bb;p=packages%2Fo%2Fopenafs.git Windows: out of date version not in current chunk In buf_GetNewLocked(), the comparision to decide whether a cm_buf_t is a member of the current chunk must take the data version into account. If the data version is out of date, it is not part of the current chunk and is an object that can be safely recycled. Change-Id: Id8ca0a897a0a65efc1cabbe39107ca210b48bd4e Reviewed-on: http://gerrit.openafs.org/5734 Reviewed-by: Derrick Brashear Tested-by: BuildBot Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- diff --git a/src/WINNT/afsd/cm_buf.c b/src/WINNT/afsd/cm_buf.c index d34281e5c..b45263ae2 100644 --- a/src/WINNT/afsd/cm_buf.c +++ b/src/WINNT/afsd/cm_buf.c @@ -1333,9 +1333,10 @@ long buf_GetNewLocked(struct cm_scache *scp, osi_hyper_t *offsetp, cm_req_t *req */ /* don't recycle someone in our own chunk */ - if (!cm_FidCmp(&bp->fid, &scp->fid) - && (bp->offset.LowPart & (-cm_chunkSize)) - == (offsetp->LowPart & (-cm_chunkSize))) { + if (!cm_FidCmp(&bp->fid, &scp->fid) && + bp->dataVersion >= scp->bufDataVersionLow && + bp->dataVersion <= scp->dataVersion && + (bp->offset.LowPart & (-cm_chunkSize)) == (offsetp->LowPart & (-cm_chunkSize))) { n_own++; continue; }