]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-windows-smb-vcp-clean-20060508
authorJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 9 May 2006 02:41:17 +0000 (02:41 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Tue, 9 May 2006 02:41:17 +0000 (02:41 +0000)
don't grab the vcp mutex after releasing the vcp

(cherry picked from commit 77fbc6a158a570f1816c87433c0e4c44c0fc8fce)

src/WINNT/afsd/smb.c

index 81b781d8d0d5735747d68dc740520d956e2455f0..b78b570e38a6c0c533f676ad7e7134faa97e7095 100644 (file)
@@ -1047,14 +1047,15 @@ void smb_CleanupDeadVC(smb_vc_t *vcp)
        uidpNext = vcp->usersp;
     }
 
+    lock_ObtainMutex(&vcp->mx);
+    vcp->flags &= ~SMB_VCFLAG_CLEAN_IN_PROGRESS;
+    lock_ReleaseMutex(&vcp->mx);
+
     /* The vcp is now on the deadVCsp list.  We intentionally drop the
      * reference so that the refcount can reach 0 and we can delete it */
     smb_ReleaseVCNoLock(vcp);
 
     lock_ReleaseWrite(&smb_rctLock);
-    lock_ObtainMutex(&vcp->mx);
-    vcp->flags &= ~SMB_VCFLAG_CLEAN_IN_PROGRESS;
-    lock_ReleaseMutex(&vcp->mx);
     osi_Log1(smb_logp, "Finished cleaning up dead vcp 0x%x", vcp);
 }