X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=drivers%2Ffilesystems%2Fcdfs_new%2Ffspdisp.c;h=e119b117e8757249b7af3fc740e960a7aa98ad9b;hp=b7c4e80b62ab5e239ce3d1ff5dc839d41272e71f;hb=3c7e9bb33243c59261b7214d3c55f1cbdd5a8558;hpb=321bcc056d3a807b7c212f91663b592178f8b819 diff --git a/drivers/filesystems/cdfs_new/fspdisp.c b/drivers/filesystems/cdfs_new/fspdisp.c old mode 100755 new mode 100644 index b7c4e80b62a..e119b117e87 --- a/drivers/filesystems/cdfs_new/fspdisp.c +++ b/drivers/filesystems/cdfs_new/fspdisp.c @@ -14,7 +14,7 @@ Abstract: --*/ -#include "CdProcs.h" +#include "cdprocs.h" // // The Bug check file id for this module @@ -24,8 +24,9 @@ Abstract: VOID +NTAPI /* ReactOS Change: GCC Does not support STDCALL by default */ CdFspDispatch ( - IN PIRP_CONTEXT IrpContext + _In_ PVOID Context ) /*++ @@ -48,7 +49,8 @@ Return Value: --*/ { - THREAD_CONTEXT ThreadContext; + THREAD_CONTEXT ThreadContext = {0}; + PIRP_CONTEXT IrpContext = Context; NTSTATUS Status; PIRP Irp = IrpContext->Irp; @@ -94,7 +96,7 @@ Return Value: while (TRUE) { - try { + _SEH2_TRY { // // Reinitialize for the next try at completing this @@ -124,7 +126,7 @@ Return Value: case IRP_MJ_CLOSE : - ASSERT( FALSE ); + NT_ASSERT( FALSE ); break; case IRP_MJ_READ : @@ -174,7 +176,7 @@ Return Value: case IRP_MJ_PNP : - ASSERT( FALSE ); + NT_ASSERT( FALSE ); CdCommonPnp( IrpContext, Irp ); break; @@ -184,10 +186,10 @@ Return Value: CdCompleteRequest( IrpContext, Irp, Status ); } - } except( CdExceptionFilter( IrpContext, GetExceptionInformation() )) { + } _SEH2_EXCEPT( CdExceptionFilter( IrpContext, _SEH2_GetExceptionInformation() )) { - Status = CdProcessException( IrpContext, Irp, GetExceptionCode() ); - } + Status = CdProcessException( IrpContext, Irp, _SEH2_GetExceptionCode() ); + } _SEH2_END; // // Break out of the loop if we didn't get CANT_WAIT. @@ -233,6 +235,12 @@ Return Value: VolDo->OverflowQueueCount -= 1; Entry = RemoveHeadList( &VolDo->OverflowQueue ); + + } else { + + VolDo->PostedRequestCount -= 1; + + Entry = NULL; } KeReleaseSpinLock( &VolDo->OverflowQueueSpinLock, SavedIrql ); @@ -242,7 +250,10 @@ Return Value: // the Ex Worker thread. // - if (Entry == NULL) { break; } + if (Entry == NULL) { + + break; + } // // Extract the IrpContext , Irp, set wait to TRUE, and loop. @@ -254,6 +265,7 @@ Return Value: Irp = IrpContext->Irp; IrpSp = IoGetCurrentIrpStackLocation( Irp ); + __analysis_assert( IrpSp != 0 ); continue; } @@ -261,15 +273,6 @@ Return Value: break; } - // - // Decrement the PostedRequestCount if there was a volume device object. - // - - if (VolDo) { - - InterlockedDecrement( &VolDo->PostedRequestCount ); - } - return; }