mirror of
https://github.com/reactos/reactos.git
synced 2024-11-18 21:13:52 +00:00
[NTOSKRNL]
Fix the way the paging IO MDLs are issued by Cc on read. Similar to r75834. Fixes tests from r75842. svn path=/trunk/; revision=75844
This commit is contained in:
parent
2cbaba6989
commit
f62d7e0c24
1 changed files with 22 additions and 7 deletions
|
@ -86,14 +86,29 @@ CcReadVirtualAddress (
|
|||
return STATUS_INSUFFICIENT_RESOURCES;
|
||||
}
|
||||
|
||||
MmBuildMdlForNonPagedPool(Mdl);
|
||||
Mdl->MdlFlags |= MDL_IO_PAGE_READ;
|
||||
KeInitializeEvent(&Event, NotificationEvent, FALSE);
|
||||
Status = IoPageRead(Vacb->SharedCacheMap->FileObject, Mdl, &Vacb->FileOffset, &Event, &IoStatus);
|
||||
if (Status == STATUS_PENDING)
|
||||
Status = STATUS_SUCCESS;
|
||||
_SEH2_TRY
|
||||
{
|
||||
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
|
||||
Status = IoStatus.Status;
|
||||
MmProbeAndLockPages(Mdl, KernelMode, IoWriteAccess);
|
||||
}
|
||||
_SEH2_EXCEPT (EXCEPTION_EXECUTE_HANDLER)
|
||||
{
|
||||
Status = _SEH2_GetExceptionCode();
|
||||
KeBugCheck(CACHE_MANAGER);
|
||||
} _SEH2_END;
|
||||
|
||||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
Mdl->MdlFlags |= MDL_IO_PAGE_READ;
|
||||
KeInitializeEvent(&Event, NotificationEvent, FALSE);
|
||||
Status = IoPageRead(Vacb->SharedCacheMap->FileObject, Mdl, &Vacb->FileOffset, &Event, &IoStatus);
|
||||
if (Status == STATUS_PENDING)
|
||||
{
|
||||
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
|
||||
Status = IoStatus.Status;
|
||||
}
|
||||
|
||||
MmUnlockPages(Mdl);
|
||||
}
|
||||
|
||||
IoFreeMdl(Mdl);
|
||||
|
|
Loading…
Reference in a new issue