Author: pschweitzer
Date: Sat Jun 3 21:50:29 2017
New Revision: 74805
URL:
http://svn.reactos.org/svn/reactos?rev=74805&view=rev
Log:
[UDFS]
Revert r74780: it indeed works here, but when the problem happens in other places (it
does!)
where it cannot be solved that way, we're doomed. It will be required to find an
appropriate solution...
CORE-4375
Modified:
trunk/reactos/drivers/filesystems/udfs/close.cpp
Modified: trunk/reactos/drivers/filesystems/udfs/close.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/udfs/c…
==============================================================================
--- trunk/reactos/drivers/filesystems/udfs/close.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/udfs/close.cpp [iso-8859-1] Sat Jun 3 21:50:29
2017
@@ -1109,6 +1109,7 @@
{
PtrUDFIrpContextLite IrpContextLite;
BOOLEAN StartWorker = FALSE;
+ BOOLEAN AcquiredVcb = FALSE;
NTSTATUS RC;
AdPrint((" UDFQueueDelayedClose\n"));
@@ -1118,6 +1119,7 @@
UDFAcquireResourceExclusive(&(UDFGlobalData.DelayedCloseResource), TRUE);
UDFAcquireResourceShared(&(Fcb->Vcb->VCBResource), TRUE);
+ AcquiredVcb = TRUE;
if(Fcb->FCBFlags & UDF_FCB_DELETE_ON_CLOSE) {
try_return(RC = STATUS_DELETE_PENDING);
@@ -1181,7 +1183,9 @@
if(!NT_SUCCESS(RC)) {
Fcb->FCBFlags &= ~UDF_FCB_DELAY_CLOSE;
}
- UDFReleaseResource(&(Fcb->Vcb->VCBResource));
+ if(AcquiredVcb) {
+ UDFReleaseResource(&(Fcb->Vcb->VCBResource));
+ }
// Release DelayedCloseResource
UDFReleaseResource(&(UDFGlobalData.DelayedCloseResource));
} _SEH2_END;