]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
DEVEL15-windows-smb-vcp-clean-20060508
authorJeffrey Altman <jaltman@secure-endpoints.com>
Thu, 1 Jun 2006 16:36:31 +0000 (16:36 +0000)
committerDerrick Brashear <shadow@dementia.org>
Thu, 1 Jun 2006 16:36:31 +0000 (16:36 +0000)
don't grab the vcp mutex after releasing the vcp

(cherry picked from commit 77fbc6a158a570f1816c87433c0e4c44c0fc8fce)

src/WINNT/afsd/smb.c

index f7bbba1809e5f6c74fc120b9122e057d5386e325..9ae605277d8653ce0f3681895f4f24ce33bb7303 100644 (file)
@@ -1095,15 +1095,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);
 }