mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +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)
|
IoCancelIrp(PIRP Irp)
|
||||||
{
|
{
|
||||||
KIRQL oldlvl;
|
KIRQL oldlvl;
|
||||||
|
PDRIVER_CANCEL CancelRoutine;
|
||||||
|
|
||||||
DPRINT("IoCancelIrp(Irp %x)\n",Irp);
|
DPRINT("IoCancelIrp(Irp %x)\n",Irp);
|
||||||
|
|
||||||
IoAcquireCancelSpinLock(&oldlvl);
|
IoAcquireCancelSpinLock(&oldlvl);
|
||||||
|
|
||||||
Irp->Cancel = TRUE;
|
Irp->Cancel = TRUE;
|
||||||
if (Irp->CancelRoutine == NULL)
|
|
||||||
|
CancelRoutine = IoSetCancelRoutine(Irp, NULL);
|
||||||
|
if (CancelRoutine == NULL)
|
||||||
{
|
{
|
||||||
IoReleaseCancelSpinLock(oldlvl);
|
IoReleaseCancelSpinLock(oldlvl);
|
||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
Irp->CancelIrql = oldlvl;
|
Irp->CancelIrql = oldlvl;
|
||||||
Irp->CancelRoutine(IoGetCurrentIrpStackLocation(Irp)->DeviceObject, Irp);
|
CancelRoutine(IoGetCurrentIrpStackLocation(Irp)->DeviceObject, Irp);
|
||||||
return(TRUE);
|
return(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue