]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-windows-more-races-20050531
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 31 May 2005 18:36:57 +0000 (18:36 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 31 May 2005 18:36:57 +0000 (18:36 +0000)
a couple of more locations at which cm_SyncOpDone() either was not
called or was called without holding the scache mutex.

(cherry picked from commit 528c511aabaefcafc01361c8038766ce56fe8e45)

src/WINNT/afsd/cm_dcache.c
src/WINNT/afsd/cm_vnodeops.c

index d5d7c70a756387a5005d6616fe25a03774b88ae5..cd7d1c0df65075273948d1f33192f15535644be2 100644 (file)
@@ -670,6 +670,7 @@ long cm_SetupStoreBIOD(cm_scache_t *scp, osi_hyper_t *inOffsetp, long inSize,
                 osi_assertx(!(bufp->flags & CM_BUF_WRITING),
                             "WRITING w/o CMSTORING in SetupStoreBIOD");
                 bufp->flags |= CM_BUF_WRITING;
+                cm_SyncOpDone(scp, bufp, flags);
                 break;
             }
 
index 2cfcf8cb325d68a9b81214d8f9061d9b6ae069ca..555023aecd278bff3488b8e65063a2ce0a2e0ada 100644 (file)
@@ -2599,8 +2599,10 @@ long cm_Rename(cm_scache_t *oldDscp, char *oldNamep, cm_scache_t *newDscp,
                 lock_ReleaseMutex(&newDscp->mx);
                 if (code) {
                     /* cleanup first one */
+                    lock_ObtainMutex(&newDscp->mx);
                     cm_SyncOpDone(oldDscp, NULL,
                                    CM_SCACHESYNC_STOREDATA);
+                    lock_ReleaseMutex(&oldDscp->mx);
                 }       
             }
         }
@@ -2619,8 +2621,10 @@ long cm_Rename(cm_scache_t *oldDscp, char *oldNamep, cm_scache_t *newDscp,
                 lock_ReleaseMutex(&oldDscp->mx);
                 if (code) {
                     /* cleanup first one */
+                    lock_ObtainMutex(&newDscp->mx);
                     cm_SyncOpDone(newDscp, NULL,
                                    CM_SCACHESYNC_STOREDATA);
+                    lock_ReleaseMutex(&newDscp->mx);
                 }       
             }
         }