X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fntoskrnl%2Fio%2Fiomgr%2Firp.c;h=0863f58907ba51f2ce7fe99618d87ef92e47e058;hp=21870d5f9cc3dda9bde6589bde60e67871079f84;hb=dfb82f3856967a4394e5e8ab1814c750f15734f0;hpb=6141336a7894c8c80f30e5dc37029dedf80c21ac;ds=sidebyside diff --git a/reactos/ntoskrnl/io/iomgr/irp.c b/reactos/ntoskrnl/io/iomgr/irp.c index 21870d5f9cc..0863f58907b 100644 --- a/reactos/ntoskrnl/io/iomgr/irp.c +++ b/reactos/ntoskrnl/io/iomgr/irp.c @@ -460,22 +460,6 @@ 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. @@ -485,6 +469,9 @@ IopCompleteRequest(IN PKAPC Apc, /* So we did return with a synch operation, was it the IRP? */ if (Irp->Flags & IRP_SYNCHRONOUS_API) { + /* Yes, this IRP was synchronous, so return the I/O Status */ + *Irp->UserIosb = Irp->IoStatus; + /* Now check if the user gave an event */ if (Irp->UserEvent) {