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 <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
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)