Author: sir_richard Date: Tue Oct 5 04:57:32 2010 New Revision: 48988
URL: http://svn.reactos.org/svn/reactos?rev=48988&view=rev Log: [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.
Modified: trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/ntoskrnl/mm/section.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=4... ============================================================================== --- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Tue Oct 5 04:57:32 2010 @@ -839,7 +839,7 @@ /* * 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 @@ /* * 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 @@ 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 @@ 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);