From f715ebaee4188300ecee57109512609c7c84cf98 Mon Sep 17 00:00:00 2001 From: Rod Widdowson Date: Sat, 22 Oct 2011 14:27:41 +0100 Subject: [PATCH] Windows: Remove unused cleanup flag In AFSOpenTargetDirectory the flag bRemoveShare was initialized FALSE and never set TRUE. In teardown after failure some code did listen to the flag, but the operation (IoRemoveShareAccess) was not protected by the FCB mainlock which it should have been. Rather than get the locking correct, just remove the flag entirely. Change-Id: I097f15bb0903f3c0889b62427d2169cf84aa04a0 Reviewed-on: http://gerrit.openafs.org/5649 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp b/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp index 63f25342a2..6d479f1c30 100644 --- a/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp +++ b/src/WINNT/afsrdr/kernel/lib/AFSCreate.cpp @@ -2061,7 +2061,6 @@ AFSOpenTargetDirectory( IN PIRP Irp, PIO_STACK_LOCATION pIrpSp = IoGetCurrentIrpStackLocation( Irp); PACCESS_MASK pDesiredAccess = NULL; USHORT usShareAccess; - BOOLEAN bRemoveAccess = FALSE; BOOLEAN bAllocatedCcb = FALSE; BOOLEAN bReleaseFcb = FALSE, bAllocatedFcb = FALSE; AFSObjectInfoCB *pParentObject = NULL, *pTargetObject = NULL; @@ -2298,13 +2297,6 @@ try_exit: *Ccb = NULL; - if( bRemoveAccess) - { - - IoRemoveShareAccess( pFileObject, - &pParentObject->Fcb->ShareAccess); - } - if( bAllocatedFcb) {