- Move the code from my previous commit before signalling the user event
authorCameron Gutman <aicommander@gmail.com>
Sun, 4 Apr 2010 18:22:54 +0000 (18:22 +0000)
committerCameron Gutman <aicommander@gmail.com>
Sun, 4 Apr 2010 18:22:54 +0000 (18:22 +0000)
- Sorry for the wasted commit number

svn path=/trunk/; revision=46720

reactos/ntoskrnl/io/iomgr/irp.c

index e3695e9..21870d5 100644 (file)
@@ -460,6 +460,22 @@ IopCompleteRequest(IN PKAPC Apc,
     }
     else
     {
+        /* Check if we have an associated user IOSB */
+        if (Irp->UserIosb)
+        {
+            /* We do, so let's give them the final status */
+            _SEH2_TRY
+            {
+               /*  Save the IOSB Information */
+               *Irp->UserIosb = Irp->IoStatus;
+            }
+            _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
+            {
+               /* Ignore any error */
+            }
+            _SEH2_END;
+        }
+
         /*
          * Either we didn't return from the request, or we did return but this
          * request was synchronous.
@@ -492,22 +508,6 @@ IopCompleteRequest(IN PKAPC Apc,
             }
         }
 
-        /* Check if we have an associated user IOSB */
-        if (Irp->UserIosb)
-        {
-            /* We do, so let's give them the final status */
-            _SEH2_TRY
-            {
-               /*  Save the IOSB Information */
-               *Irp->UserIosb = Irp->IoStatus;
-            }
-            _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER)
-            {
-               /* Ignore any error */
-            }
-            _SEH2_END;
-        }
-
         /* Now that we got here, we do this for incomplete I/Os as well */
         if ((FileObject) && !(Irp->Flags & IRP_CREATE_OPERATION))
         {