From b6084f4ac95613cd02c3cec71b26be4bd19af85d Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Fri, 3 Feb 2012 11:21:45 -0500 Subject: [PATCH] Windows: fix cm_DirOpDelBuffer assert In cm_DirOpDelBuffer() the data version field for a buffer in cm_dirOp_t.buffers[] can be CM_BUF_VERSION_BAD if the buffer was added to the buffer list but was never fetched from the file server. If the buffer was recycled by buf_Get() an attempt to remove an entry from the directory will be failed as opposed to fetching the buffer from the file server and performing the local removal. Reviewed-on: http://gerrit.openafs.org/6650 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman (cherry picked from commit 865f2442e682ff71b28a6b21363de8262f9e2bd1) Change-Id: I4d822d9286ca891fc50cf04fdd68272c0af2e38e Reviewed-on: http://gerrit.openafs.org/6828 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsd/cm_dir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WINNT/afsd/cm_dir.c b/src/WINNT/afsd/cm_dir.c index f73d3d6da..04bc0e683 100644 --- a/src/WINNT/afsd/cm_dir.c +++ b/src/WINNT/afsd/cm_dir.c @@ -1421,7 +1421,7 @@ cm_DirOpDelBuffer(cm_dirOp_t * op, cm_buf_t * bufferp, int flags) (op->lockType == CM_DIRLOCK_WRITE ? CM_SCACHESYNC_WRITE : CM_SCACHESYNC_READ)); #ifdef DEBUG - osi_assert(bufferp->dataVersion == op->dataVersion); + osi_assert(bufferp->dataVersion == op->dataVersion || bufferp->dataVersion == CM_BUF_VERSION_BAD); #endif lock_ReleaseWrite(&op->scp->rw); -- 2.39.5