Author: pschweitzer
Date: Sun May 24 12:39:10 2015
New Revision: 67880
URL:
http://svn.reactos.org/svn/reactos?rev=67880&view=rev
Log:
[FASTFAT]
- Add a debugging assert that will save your lot of time if you attempt to manually queue
a wrong IRP. You cannot queue an IRP which is set to be later queued again. This is a
broken behavior.
- Remove a bit of code duplication
Modified:
trunk/reactos/drivers/filesystems/fastfat/misc.c
Modified: trunk/reactos/drivers/filesystems/fastfat/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filesystems/fastfa…
==============================================================================
--- trunk/reactos/drivers/filesystems/fastfat/misc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filesystems/fastfat/misc.c [iso-8859-1] Sun May 24 12:39:10
2015
@@ -112,6 +112,8 @@
ASSERT(IrpContext);
+ FsRtlEnterFileSystem();
+
switch (IrpContext->MajorFunction)
{
case IRP_MJ_CLOSE:
@@ -202,6 +204,8 @@
VfatFreeIrpContext(IrpContext);
}
+ FsRtlExitFileSystem();
+
return Status;
}
@@ -228,9 +232,7 @@
}
else
{
- FsRtlEnterFileSystem();
Status = VfatDispatchRequest(IrpContext);
- FsRtlExitFileSystem();
}
return Status;
}
@@ -302,9 +304,7 @@
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 @@
ASSERT(IrpContext != NULL);
ASSERT(IrpContext->Irp != NULL);
+ ASSERT(!(IrpContext->Flags & IRPCONTEXT_QUEUE) &&
+ (IrpContext->Flags & IRPCONTEXT_COMPLETE));
IrpContext->Flags |= IRPCONTEXT_CANWAIT;
IoMarkIrpPending(IrpContext->Irp);