- Fix Irp flags assignment in case of an IoAllocateIrp call with ChargeQuota set to TRUE. Reduces number of kmtest failures by 1.

svn path=/trunk/; revision=34959
This commit is contained in:
Aleksey Bragin 2008-07-30 13:24:05 +00:00
parent e0acf025bc
commit 8db0ed2181

View file

@ -525,6 +525,9 @@ IoAllocateIrp(IN CCHAR StackSize,
PNPAGED_LOOKASIDE_LIST List = NULL; PNPAGED_LOOKASIDE_LIST List = NULL;
PP_NPAGED_LOOKASIDE_NUMBER ListType = LookasideSmallIrpList; PP_NPAGED_LOOKASIDE_NUMBER ListType = LookasideSmallIrpList;
/* Set Charge Quota Flag */
if (ChargeQuota) Flags |= IRP_QUOTA_CHARGED;
/* Figure out which Lookaside List to use */ /* Figure out which Lookaside List to use */
if ((StackSize <= 8) && (ChargeQuota == FALSE)) if ((StackSize <= 8) && (ChargeQuota == FALSE))
{ {
@ -586,11 +589,11 @@ IoAllocateIrp(IN CCHAR StackSize,
else else
{ {
/* We have an IRP from Lookaside */ /* We have an IRP from Lookaside */
Flags |= IRP_LOOKASIDE_ALLOCATION; if (ChargeQuota) Flags |= IRP_LOOKASIDE_ALLOCATION;
}
/* Set Flag */ /* In this case there is no charge quota */
if (ChargeQuota) Flags |= IRP_QUOTA_CHARGED; Flags &= ~IRP_QUOTA_CHARGED;
}
/* Now Initialize it */ /* Now Initialize it */
IoInitializeIrp(Irp, Size, StackSize); IoInitializeIrp(Irp, Size, StackSize);