mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
Do always set the UserIosb of an irp in IoSecondStageCompletion.
svn path=/trunk/; revision=14964
This commit is contained in:
parent
f2b9954c3f
commit
5255b326ec
1 changed files with 7 additions and 5 deletions
|
@ -1265,14 +1265,18 @@ IoSecondStageCompletion(PKAPC Apc,
|
||||||
}
|
}
|
||||||
Irp->MdlAddress = NULL;
|
Irp->MdlAddress = NULL;
|
||||||
|
|
||||||
|
if (Irp->UserIosb)
|
||||||
|
{
|
||||||
|
/* Save the IOSB Information */
|
||||||
|
*Irp->UserIosb = Irp->IoStatus;
|
||||||
|
}
|
||||||
|
|
||||||
/* Check for Success but allow failure for Async IRPs */
|
/* Check for Success but allow failure for Async IRPs */
|
||||||
if (NT_SUCCESS(Irp->IoStatus.Status) ||
|
if (NT_SUCCESS(Irp->IoStatus.Status) ||
|
||||||
(Irp->PendingReturned &&
|
(Irp->PendingReturned &&
|
||||||
!(Irp->Flags & IRP_SYNCHRONOUS_API) &&
|
!(Irp->Flags & IRP_SYNCHRONOUS_API) &&
|
||||||
(FileObject == NULL || FileObject->Flags & FO_SYNCHRONOUS_IO)))
|
(FileObject == NULL || FileObject->Flags & FO_SYNCHRONOUS_IO)))
|
||||||
{
|
{
|
||||||
/* Save the IOSB Information */
|
|
||||||
*Irp->UserIosb = Irp->IoStatus;
|
|
||||||
|
|
||||||
/* Check if there's an event */
|
/* Check if there's an event */
|
||||||
if (Irp->UserEvent)
|
if (Irp->UserEvent)
|
||||||
|
@ -1361,8 +1365,6 @@ IoSecondStageCompletion(PKAPC Apc,
|
||||||
/* Check for SYNC IRP */
|
/* Check for SYNC IRP */
|
||||||
if (Irp->Flags & IRP_SYNCHRONOUS_API)
|
if (Irp->Flags & IRP_SYNCHRONOUS_API)
|
||||||
{
|
{
|
||||||
/* Set the status in this case only */
|
|
||||||
*Irp->UserIosb = Irp->IoStatus;
|
|
||||||
|
|
||||||
/* Signal our event if we have one */
|
/* Signal our event if we have one */
|
||||||
if (Irp->UserEvent)
|
if (Irp->UserEvent)
|
||||||
|
|
Loading…
Reference in a new issue