Author: fireball
Date: Wed Jul 30 08:24:05 2008
New Revision: 34959
URL:
http://svn.reactos.org/svn/reactos?rev=34959&view=rev
Log:
- Fix Irp flags assignment in case of an IoAllocateIrp call with ChargeQuota set to TRUE.
Reduces number of kmtest failures by 1.
Modified:
trunk/reactos/ntoskrnl/io/iomgr/irp.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/irp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/irp.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/irp.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/irp.c [iso-8859-1] Wed Jul 30 08:24:05 2008
@@ -525,6 +525,9 @@
PNPAGED_LOOKASIDE_LIST List = NULL;
PP_NPAGED_LOOKASIDE_NUMBER ListType = LookasideSmallIrpList;
+ /* Set Charge Quota Flag */
+ if (ChargeQuota) Flags |= IRP_QUOTA_CHARGED;
+
/* Figure out which Lookaside List to use */
if ((StackSize <= 8) && (ChargeQuota == FALSE))
{
@@ -586,11 +589,11 @@
else
{
/* We have an IRP from Lookaside */
- Flags |= IRP_LOOKASIDE_ALLOCATION;
- }
-
- /* Set Flag */
- if (ChargeQuota) Flags |= IRP_QUOTA_CHARGED;
+ if (ChargeQuota) Flags |= IRP_LOOKASIDE_ALLOCATION;
+
+ /* In this case there is no charge quota */
+ Flags &= ~IRP_QUOTA_CHARGED;
+ }
/* Now Initialize it */
IoInitializeIrp(Irp, Size, StackSize);