From bcd5f02d0f5070a85675dcced9c6dfb7a1374467 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Sat, 3 Jun 2017 18:12:25 +0000 Subject: [PATCH] [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 svn path=/trunk/; revision=74780 --- reactos/drivers/filesystems/udfs/close.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/reactos/drivers/filesystems/udfs/close.cpp b/reactos/drivers/filesystems/udfs/close.cpp index 24db44be172..74fa49eb467 100644 --- a/reactos/drivers/filesystems/udfs/close.cpp +++ b/reactos/drivers/filesystems/udfs/close.cpp @@ -1109,7 +1109,6 @@ UDFQueueDelayedClose( { PtrUDFIrpContextLite IrpContextLite; BOOLEAN StartWorker = FALSE; - BOOLEAN AcquiredVcb = FALSE; NTSTATUS RC; AdPrint((" UDFQueueDelayedClose\n")); @@ -1119,7 +1118,6 @@ UDFQueueDelayedClose( 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 @@ try_exit: NOTHING; 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;