mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 19:26:05 +00:00
IoCancelIrp didnt remove the cancel routine from the irp after canceling it
svn path=/trunk/; revision=13853
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user