X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fntoskrnl%2Fio%2Fiomgr%2Firp.c;h=21870d5f9cc3dda9bde6589bde60e67871079f84;hp=e3695e9d2fbf5989210f3379a3244c75ba1eccc7;hb=7be442943e1c21ab7b877932b900eb842c6a2084;hpb=2f22a7d7f8ea8ac279fe75ff0f9323cb20037a08 diff --git a/reactos/ntoskrnl/io/iomgr/irp.c b/reactos/ntoskrnl/io/iomgr/irp.c index e3695e9d2fb..21870d5f9cc 100644 --- a/reactos/ntoskrnl/io/iomgr/irp.c +++ b/reactos/ntoskrnl/io/iomgr/irp.c @@ -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)) {