Author: pschweitzer
Date: Sat Jun 3 18:12:25 2017
New Revision: 74780
URL: http://svn.reactos.org/svn/reactos?rev=74780&view=rev
Log:
[UDFS]
HIde a bug in UDFQueueDelayedClose() by removing the boolean storing the fact
that VCB resource was (or not) acquired.
If you debug it, you see that in finally block, value is set to false on exit
without any reason: it is always acquired!
Given it's always acquired, just drop the boolean, but this doesn't explain the
root cause of this bug....
Here it helps avoiding deadlocks on directory listing on a DVD formatted with UDF
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 18:12:25 2017
@@ -1109,7 +1109,6 @@
{
PtrUDFIrpContextLite IrpContextLite;
BOOLEAN StartWorker = FALSE;
- BOOLEAN AcquiredVcb = FALSE;
NTSTATUS RC;
AdPrint((" UDFQueueDelayedClose\n"));
@@ -1119,7 +1118,6 @@
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);
@@ -1183,9 +1181,7 @@
if(!NT_SUCCESS(RC)) {
Fcb->FCBFlags &= ~UDF_FCB_DELAY_CLOSE;
}
- if(AcquiredVcb) {
- UDFReleaseResource(&(Fcb->Vcb->VCBResource));
- }
+ UDFReleaseResource(&(Fcb->Vcb->VCBResource));
// Release DelayedCloseResource
UDFReleaseResource(&(UDFGlobalData.DelayedCloseResource));
} _SEH2_END;