From f05c21fa3a0ecdbebabe601049252d78d23be488 Mon Sep 17 00:00:00 2001 From: Gunnar Dalsnes Date: Mon, 7 Mar 2005 00:04:21 +0000 Subject: [PATCH] fix nasty bug:-( svn path=/trunk/; revision=13863 --- reactos/doc/irp cancel boilerplate.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/reactos/doc/irp cancel boilerplate.c b/reactos/doc/irp cancel boilerplate.c index 94746a363e3..d56d3bc976b 100644 --- a/reactos/doc/irp cancel boilerplate.c +++ b/reactos/doc/irp cancel boilerplate.c @@ -38,10 +38,12 @@ QUEUE_BOLIERPLATE IoSetCancelRoutine(Irp, CancelRoutine); 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, - // so complete irp ourself - + /* + Irp has already been cancelled (before we got to queue it), + and we got to remove the cancel routine before the canceler could, + so we cancel/complete the irp ourself. + */ + Unlock(theLock); Irp->IoStatus.Status = STATUS_CANCELLED; @@ -79,6 +81,10 @@ DEQUEUE_BOILERPLATE */ InitializeListHead(&Irp->Tail.Overlay.ListEntry); + + Unlock(theLock); + + return; }