fix nasty bug:-(
Modified: trunk/reactos/doc/irp cancel boilerplate.c

Modified: trunk/reactos/doc/irp cancel boilerplate.c
--- trunk/reactos/doc/irp cancel boilerplate.c	2005-03-06 22:00:23 UTC (rev 13862)
+++ trunk/reactos/doc/irp cancel boilerplate.c	2005-03-07 00:04:21 UTC (rev 13863)
@@ -38,10 +38,12 @@
    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 @@
       */
  
       InitializeListHead(&Irp->Tail.Overlay.ListEntry);
+      
+      Unlock(theLock);
+      
+      return;
    }