diff --git a/ntoskrnl/cc/copy.c b/ntoskrnl/cc/copy.c index e01f2b46865be..b969bfdb856e8 100644 --- a/ntoskrnl/cc/copy.c +++ b/ntoskrnl/cc/copy.c @@ -653,7 +653,9 @@ CcCopyWrite ( CurrentOffset += VacbLength; /* Tell Mm */ - Status = MmMakePagesDirty(NULL, Add2Ptr(Vacb->BaseAddress, VacbOffset), VacbLength); + Status = MmMakeSegmentDirty(FileObject->SectionObjectPointer, + Vacb->FileOffset.QuadPart + VacbOffset, + VacbLength); if (!NT_SUCCESS(Status)) ExRaiseStatus(Status); } @@ -913,7 +915,9 @@ CcZeroData ( Length -= VacbLength; /* Tell Mm */ - Status = MmMakePagesDirty(NULL, Add2Ptr(Vacb->BaseAddress, VacbOffset), VacbLength); + Status = MmMakeSegmentDirty(FileObject->SectionObjectPointer, + Vacb->FileOffset.QuadPart + VacbOffset, + VacbLength); if (!NT_SUCCESS(Status)) ExRaiseStatus(Status); } diff --git a/ntoskrnl/cc/pin.c b/ntoskrnl/cc/pin.c index dcd1d5483a55c..e37a1c97d6bbd 100644 --- a/ntoskrnl/cc/pin.c +++ b/ntoskrnl/cc/pin.c @@ -551,17 +551,18 @@ CcSetDirtyPinnedData ( IN PLARGE_INTEGER Lsn) { PINTERNAL_BCB iBcb = CONTAINING_RECORD(Bcb, INTERNAL_BCB, PFCB); + PROS_VACB Vacb = iBcb->Vacb; 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); + MmMakeSegmentDirty(Vacb->SharedCacheMap->FileObject->SectionObjectPointer, + iBcb->PFCB.MappedFileOffset.QuadPart, + iBcb->PFCB.MappedLength); - if (!iBcb->Vacb->Dirty) + if (!Vacb->Dirty) { - CcRosMarkDirtyVacb(iBcb->Vacb); + CcRosMarkDirtyVacb(Vacb); } }