mirror of
https://github.com/reactos/reactos.git
synced 2024-06-29 01:12:06 +00:00
[NTOS/CC] Be more precise when notifying Mm about dirty pages
This commit is contained in:
parent
c295d6b229
commit
c74cbf0c0b
|
@ -586,6 +586,11 @@ CcCopyWrite (
|
|||
Buffer = (PVOID)((ULONG_PTR)Buffer + VacbLength);
|
||||
CurrentOffset += VacbLength;
|
||||
Length -= VacbLength;
|
||||
|
||||
/* Tell Mm */
|
||||
Status = MmMakePagesDirty(NULL, Add2Ptr(Vacb->BaseAddress, VacbOffset), VacbLength);
|
||||
if (!NT_SUCCESS(Status))
|
||||
ExRaiseStatus(Status);
|
||||
}
|
||||
_SEH2_FINALLY
|
||||
{
|
||||
|
@ -829,6 +834,11 @@ CcZeroData (
|
|||
|
||||
WriteOffset.QuadPart += VacbLength;
|
||||
Length -= VacbLength;
|
||||
|
||||
/* Tell Mm */
|
||||
Status = MmMakePagesDirty(NULL, Add2Ptr(Vacb->BaseAddress, VacbOffset), VacbLength);
|
||||
if (!NT_SUCCESS(Status))
|
||||
ExRaiseStatus(Status);
|
||||
}
|
||||
_SEH2_FINALLY
|
||||
{
|
||||
|
|
|
@ -540,6 +540,11 @@ CcSetDirtyPinnedData (
|
|||
CCTRACE(CC_API_DEBUG, "Bcb=%p Lsn=%p\n",
|
||||
Bcb, Lsn);
|
||||
|
||||
/* Tell Mm */
|
||||
MmMakePagesDirty(NULL,
|
||||
Add2Ptr(iBcb->Vacb->BaseAddress, iBcb->PFCB.MappedFileOffset.QuadPart - iBcb->Vacb->FileOffset.QuadPart),
|
||||
iBcb->PFCB.MappedLength);
|
||||
|
||||
if (!iBcb->Vacb->Dirty)
|
||||
{
|
||||
CcRosMarkDirtyVacb(iBcb->Vacb);
|
||||
|
|
|
@ -420,9 +420,6 @@ CcRosMarkDirtyVacb (
|
|||
CcScheduleLazyWriteScan(FALSE);
|
||||
}
|
||||
KeReleaseQueuedSpinLock(LockQueueMasterLock, oldIrql);
|
||||
|
||||
/* Tell Mm */
|
||||
MmMakePagesDirty(NULL, Vacb->BaseAddress, Length);
|
||||
}
|
||||
|
||||
VOID
|
||||
|
|
Loading…
Reference in a new issue