-/* $Id: irp.c,v 1.65 2004/08/15 16:39:03 chorns Exp $
+/* $Id: irp.c,v 1.66 2004/08/18 02:24:02 navaraf Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* Irp = Master irp
* StackSize = Number of stack locations to be allocated in the irp
* RETURNS: The irp allocated
+ * NOTE: The caller is responsible for incrementing
+ * Irp->AssociatedIrp.IrpCount.
*/
{
PIRP AssocIrp;
/* Associate them */
AssocIrp->AssociatedIrp.MasterIrp = Irp;
- InterlockedIncrement(&Irp->AssociatedIrp.IrpCount);
return AssocIrp;
}
while ((Mdl = Irp->MdlAddress))
{
Irp->MdlAddress = Mdl->Next;
- MmUnlockPages(Mdl);
IoFreeMdl(Mdl);
}
IoFreeIrp(Irp);
VOID STDCALL
IoSetTopLevelIrp(IN PIRP Irp)
{
- PETHREAD Thread;
+ PETHREAD Thread;
Thread = PsGetCurrentThread();
Thread->TopLevelIrp = Irp;