mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 17:34:57 +00:00
- Bypass IoSecondStageCompletion for irp's with the flags
IRP_PAGING_IO or IRP_CLOSE_OPERATION in IofCompleteRequest. svn path=/trunk/; revision=7366
This commit is contained in:
parent
76706d5835
commit
237c87c4c3
1 changed files with 64 additions and 36 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: irp.c,v 1.56 2003/12/30 18:52:04 fireball Exp $
|
/* $Id: irp.c,v 1.57 2003/12/31 14:16:18 hbirr Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -284,6 +284,33 @@ IofCompleteRequest(PIRP Irp,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Irp->Flags & (IRP_PAGING_IO|IRP_CLOSE_OPERATION))
|
||||||
|
{
|
||||||
|
if (Irp->Flags & IRP_PAGING_IO)
|
||||||
|
{
|
||||||
|
/* FIXME:
|
||||||
|
* The mdl must be freed by the caller!
|
||||||
|
*/
|
||||||
|
if (Irp->MdlAddress->MappedSystemVa != NULL)
|
||||||
|
{
|
||||||
|
MmUnmapLockedPages(Irp->MdlAddress->MappedSystemVa,
|
||||||
|
Irp->MdlAddress);
|
||||||
|
}
|
||||||
|
MmUnlockPages(Irp->MdlAddress);
|
||||||
|
ExFreePool(Irp->MdlAddress);
|
||||||
|
}
|
||||||
|
if (Irp->UserIosb)
|
||||||
|
{
|
||||||
|
*Irp->UserIosb = Irp->IoStatus;
|
||||||
|
}
|
||||||
|
if (Irp->UserEvent)
|
||||||
|
{
|
||||||
|
KeSetEvent(Irp->UserEvent, PriorityBoost, FALSE);
|
||||||
|
}
|
||||||
|
IoFreeIrp(Irp);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
//Windows NT File System Internals, page 154
|
//Windows NT File System Internals, page 154
|
||||||
OriginalFileObject = Irp->Tail.Overlay.OriginalFileObject;
|
OriginalFileObject = Irp->Tail.Overlay.OriginalFileObject;
|
||||||
|
|
||||||
|
@ -321,6 +348,7 @@ IofCompleteRequest(PIRP Irp,
|
||||||
KeLowerIrql(oldIrql);
|
KeLowerIrql(oldIrql);
|
||||||
DPRINT("Finished completition routine\n");
|
DPRINT("Finished completition routine\n");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue