fix nasty bug:-(

svn path=/trunk/; revision=13863
This commit is contained in:
Gunnar Dalsnes 2005-03-07 00:04:21 +00:00
parent d95010663e
commit f05c21fa3a

View file

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