Windows: do not forget cm_SyncOpDone
authorJeffrey Altman <jaltman@your-file-system.com>
Tue, 5 Aug 2014 05:40:22 +0000 (01:40 -0400)
committerJeffrey Altman <jaltman@your-file-system.com>
Thu, 21 Aug 2014 03:48:02 +0000 (23:48 -0400)
If cm_SyncOp was called, then cm_SyncOpDone must be called.
By goto out of the loop, the cm_SyncOpDone call was skipped.

Change-Id: I20105ec8708c19eecbf215258ada0779cd705f73
Reviewed-on: http://gerrit.openafs.org/11414
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

src/WINNT/afsd/cm_vnodeops.c

index d031b10..cc0692c 100644 (file)
@@ -2889,8 +2889,12 @@ long cm_SetLength(cm_scache_t *scp, osi_hyper_t *sizep, cm_user_t *userp,
          * than where we're truncating the file, set truncPos to this
          * new value.
          */
-        if (!shrinking)
+       if (!shrinking) {
+           cm_SyncOpDone(scp, NULL,
+                         CM_SCACHESYNC_NEEDCALLBACK | CM_SCACHESYNC_GETSTATUS
+                         | CM_SCACHESYNC_SETSTATUS | CM_SCACHESYNC_SETSIZE);
             goto startover;
+       }
         if (!(scp->mask & CM_SCACHEMASK_TRUNCPOS)
              || LargeIntegerLessThan(*sizep, scp->length)) {
             /* set trunc pos */