From e77b6858ee889ec9e4e3fe3bb62c23b1c1f5727f Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Tue, 3 Jan 2012 21:10:32 -0500 Subject: [PATCH] Windows: dir buffers out of date - mark them as such if cm_CheckForSingleDirChange() fails, mark the cm_scache_t bufDataVersionLow as the current data version so that old directory buffers are discarded. Change-Id: I8d587a024027e74e66190fdc993564b640993b4c Reviewed-on: http://gerrit.openafs.org/6498 Tested-by: BuildBot Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsd/cm_dir.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/WINNT/afsd/cm_dir.c b/src/WINNT/afsd/cm_dir.c index dae870fbea..86744ccc15 100644 --- a/src/WINNT/afsd/cm_dir.c +++ b/src/WINNT/afsd/cm_dir.c @@ -1169,14 +1169,23 @@ cm_CheckDirOpForSingleChange(cm_dirOp_t * op) code = cm_DirCheckStatus(op, 1); if (code == 0 && - op->dataVersion == op->scp->dataVersion - 1) { - /* only one set of changes happened between cm_BeginDirOp() - and this function. It is safe for us to perform local - changes. */ + op->dataVersion == op->scp->dataVersion - 1) + { + /* + * only one set of changes happened between cm_BeginDirOp() + * and this function. It is safe for us to perform local + * changes. */ op->newDataVersion = op->scp->dataVersion; op->newLength = op->scp->serverLength; rc = 1; + } else { + /* + * The directory buffers are no longer up to date. + */ + op->scp->bufDataVersionLow = op->scp->dataVersion; + + rc = 0; } if (rc)