Setup the correct stack location for completion routines in IofCompleteRequest.

This change correct also the called completion routine in IoSecondStageCompletion
(ntoskrnl\io\cleanup.c).

svn path=/trunk/; revision=3342
This commit is contained in:
Hartmut Birr 2002-08-17 15:20:33 +00:00
parent 74e8579c8f
commit 675afa7691

View file

@ -1,4 +1,4 @@
/* $Id: irp.c,v 1.40 2002/04/10 09:57:31 ekohl Exp $ /* $Id: irp.c,v 1.41 2002/08/17 15:20:33 hbirr Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -226,7 +226,7 @@ IofCompleteRequest(PIRP Irp,
DPRINT("IoCompleteRequest(Irp %x, PriorityBoost %d) Event %x THread %x\n", DPRINT("IoCompleteRequest(Irp %x, PriorityBoost %d) Event %x THread %x\n",
Irp,PriorityBoost, Irp->UserEvent, PsGetCurrentThread()); Irp,PriorityBoost, Irp->UserEvent, PsGetCurrentThread());
for (i=0;i<Irp->StackCount;i++) for (i=Irp->CurrentLocation;i<Irp->StackCount;i++)
{ {
if (Irp->Stack[i].CompletionRoutine != NULL) if (Irp->Stack[i].CompletionRoutine != NULL)
{ {
@ -243,6 +243,10 @@ IofCompleteRequest(PIRP Irp,
{ {
Irp->PendingReturned = TRUE; Irp->PendingReturned = TRUE;
} }
if (Irp->CurrentLocation < Irp->StackCount - 1)
{
IoSkipCurrentIrpStackLocation(Irp);
}
} }
if (Irp->PendingReturned) if (Irp->PendingReturned)
{ {