IoSetCancelRoutine(Irp, CancelRoutine);\r
if (Irp->Cancel && IoSetCancelRoutine(Irp, NULL))\r
{ \r
- // IRP has already been cancelled (before we got to queue it),\r
- // but we got to remove the cancel routine before the canceler could, \r
- // so complete irp ourself\r
- \r
+ /*\r
+ Irp has already been cancelled (before we got to queue it),\r
+ and we got to remove the cancel routine before the canceler could, \r
+ so we cancel/complete the irp ourself.\r
+ */\r
+ \r
Unlock(theLock);\r
\r
Irp->IoStatus.Status = STATUS_CANCELLED;\r
*/\r
\r
InitializeListHead(&Irp->Tail.Overlay.ListEntry);\r
+ \r
+ Unlock(theLock);\r
+ \r
+ return;\r
} \r
\r
\r