X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fdrivers%2Ffilesystems%2Ffastfat%2Fmisc.c;h=39e589688b847979cc553ea5879f9289a801c445;hp=1e97d7a82fbbdf7dcd02683c01fb07cc78bedff7;hb=63560ef20365e41c230c3064a26512642d850abc;hpb=578d9849a058e38505b58b7b2c80ead231a94fc7 diff --git a/reactos/drivers/filesystems/fastfat/misc.c b/reactos/drivers/filesystems/fastfat/misc.c index 1e97d7a82fb..39e589688b8 100644 --- a/reactos/drivers/filesystems/fastfat/misc.c +++ b/reactos/drivers/filesystems/fastfat/misc.c @@ -112,6 +112,8 @@ VfatDispatchRequest( ASSERT(IrpContext); + FsRtlEnterFileSystem(); + switch (IrpContext->MajorFunction) { case IRP_MJ_CLOSE: @@ -202,6 +204,8 @@ VfatDispatchRequest( VfatFreeIrpContext(IrpContext); } + FsRtlExitFileSystem(); + return Status; } @@ -228,9 +232,7 @@ VfatBuildRequest( } else { - FsRtlEnterFileSystem(); Status = VfatDispatchRequest(IrpContext); - FsRtlExitFileSystem(); } return Status; } @@ -302,9 +304,7 @@ VfatDoRequest( InterlockedDecrement(&QueueCount); DPRINT("VfatDoRequest(IrpContext %p), MajorFunction %x, %d\n", IrpContext, ((PVFAT_IRP_CONTEXT)IrpContext)->MajorFunction, QueueCount); - FsRtlEnterFileSystem(); VfatDispatchRequest((PVFAT_IRP_CONTEXT)IrpContext); - FsRtlExitFileSystem(); } static @@ -317,6 +317,8 @@ VfatQueueRequest( ASSERT(IrpContext != NULL); ASSERT(IrpContext->Irp != NULL); + ASSERT(!(IrpContext->Flags & IRPCONTEXT_QUEUE) && + (IrpContext->Flags & IRPCONTEXT_COMPLETE)); IrpContext->Flags |= IRPCONTEXT_CANWAIT; IoMarkIrpPending(IrpContext->Irp);