[NTOS]: Nobody actually writes TRUE for WriteCopyView in the MEMORY_AREA data structure, so this field is useless (always false). Remove all instances of its use.

svn path=/trunk/; revision=48988
This commit is contained in:
Sir Richard 2010-10-05 04:57:32 +00:00
parent fe408085b7
commit 35beef2751

View file

@ -839,7 +839,7 @@ MmNotPresentFaultSectionView(PMMSUPPORT AddressSpace,
/*
* Check if this page needs to be mapped COW
*/
if ((Segment->WriteCopy || MemoryArea->Data.SectionData.WriteCopyView) &&
if ((Segment->WriteCopy) &&
(Region->Protect == PAGE_READWRITE ||
Region->Protect == PAGE_EXECUTE_READWRITE))
{
@ -1331,7 +1331,7 @@ MmAccessFaultSectionView(PMMSUPPORT AddressSpace,
/*
* Check if we are doing COW
*/
if (!((Segment->WriteCopy || MemoryArea->Data.SectionData.WriteCopyView) &&
if (!((Segment->WriteCopy) &&
(Region->Protect == PAGE_READWRITE ||
Region->Protect == PAGE_EXECUTE_READWRITE)))
{
@ -2015,7 +2015,7 @@ MmAlterViewAttributes(PMMSUPPORT AddressSpace,
MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, BaseAddress);
Segment = MemoryArea->Data.SectionData.Segment;
if ((Segment->WriteCopy || MemoryArea->Data.SectionData.WriteCopyView) &&
if ((Segment->WriteCopy) &&
(NewProtect == PAGE_READWRITE || NewProtect == PAGE_EXECUTE_READWRITE))
{
DoCOW = TRUE;
@ -3518,7 +3518,6 @@ MmMapViewOfSegment(PMMSUPPORT AddressSpace,
MArea->Data.SectionData.Segment = Segment;
MArea->Data.SectionData.Section = Section;
MArea->Data.SectionData.ViewOffset = ViewOffset;
MArea->Data.SectionData.WriteCopyView = FALSE;
MmInitializeRegion(&MArea->Data.SectionData.RegionListHead,
ViewSize, 0, Protect);