mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
IoCancelIrp didnt remove the cancel routine from the irp after canceling it
svn path=/trunk/; revision=13853
This commit is contained in:
parent
4369eecce7
commit
c02ae1b606
1 changed files with 7 additions and 2 deletions
|
@ -204,18 +204,23 @@ BOOLEAN STDCALL
|
|||
IoCancelIrp(PIRP Irp)
|
||||
{
|
||||
KIRQL oldlvl;
|
||||
PDRIVER_CANCEL CancelRoutine;
|
||||
|
||||
DPRINT("IoCancelIrp(Irp %x)\n",Irp);
|
||||
|
||||
IoAcquireCancelSpinLock(&oldlvl);
|
||||
|
||||
Irp->Cancel = TRUE;
|
||||
if (Irp->CancelRoutine == NULL)
|
||||
|
||||
CancelRoutine = IoSetCancelRoutine(Irp, NULL);
|
||||
if (CancelRoutine == NULL)
|
||||
{
|
||||
IoReleaseCancelSpinLock(oldlvl);
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
Irp->CancelIrql = oldlvl;
|
||||
Irp->CancelRoutine(IoGetCurrentIrpStackLocation(Irp)->DeviceObject, Irp);
|
||||
CancelRoutine(IoGetCurrentIrpStackLocation(Irp)->DeviceObject, Irp);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue