https://git.reactos.org/?p=reactos.git;a=commitdiff;h=54c760574b2ac55006c0e233fd1ee7857a5a9a42

commit 54c760574b2ac55006c0e233fd1ee7857a5a9a42
Author:     Jérôme Gardou <jerome.gar...@reactos.org>
AuthorDate: Fri Oct 23 11:42:09 2020 +0200
Commit:     Jérôme Gardou <jerome.gar...@reactos.org>
CommitDate: Wed Feb 3 09:41:21 2021 +0100

    [NTOSKRNL] Rename MM_ROS_SECTION_OBJECT:MaximumSize to SizeOfSection
    
    For consistency with the SECTION struct
---
 ntoskrnl/include/internal/mm.h |  2 +-
 ntoskrnl/mm/section.c          | 18 +++++++++---------
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/ntoskrnl/include/internal/mm.h b/ntoskrnl/include/internal/mm.h
index d1754ec4f5c..e803142d651 100644
--- a/ntoskrnl/include/internal/mm.h
+++ b/ntoskrnl/include/internal/mm.h
@@ -199,7 +199,7 @@ typedef struct _ROS_SECTION_OBJECT
 {
     CSHORT Type;
     CSHORT Size;
-    LARGE_INTEGER MaximumSize;
+    LARGE_INTEGER SizeOfSection;
     ULONG SectionPageProtection;
     ULONG AllocationAttributes;
     PFILE_OBJECT FileObject;
diff --git a/ntoskrnl/mm/section.c b/ntoskrnl/mm/section.c
index f586ec37754..13835bb94ac 100644
--- a/ntoskrnl/mm/section.c
+++ b/ntoskrnl/mm/section.c
@@ -2881,7 +2881,7 @@ MmCreatePageFileSection(PROS_SECTION_OBJECT 
*SectionObject,
     Section->Size = 'TN';
     Section->SectionPageProtection = SectionPageProtection;
     Section->AllocationAttributes = AllocationAttributes;
-    Section->MaximumSize = MaximumSize;
+    Section->SizeOfSection = MaximumSize;
     Segment = ExAllocatePoolWithTag(NonPagedPool, sizeof(MM_SECTION_SEGMENT),
                                     TAG_MM_SECTION_SEGMENT);
     if (Segment == NULL)
@@ -3087,7 +3087,7 @@ MmCreateDataFileSection(PROS_SECTION_OBJECT 
*SectionObject,
     }
     MmUnlockSectionSegment(Segment);
     Section->FileObject = FileObject;
-    Section->MaximumSize = MaximumSize;
+    Section->SizeOfSection = MaximumSize;
 #ifndef NEWCC
     CcRosReferenceCache(FileObject);
 #endif
@@ -4678,11 +4678,11 @@ MmMapViewOfSection(IN PVOID SectionObject,
 
         if ((*ViewSize) == 0)
         {
-            (*ViewSize) = Section->MaximumSize.u.LowPart - ViewOffset;
+            (*ViewSize) = Section->SizeOfSection.u.LowPart - ViewOffset;
         }
-        else if (((*ViewSize)+ViewOffset) > Section->MaximumSize.u.LowPart)
+        else if (((*ViewSize)+ViewOffset) > Section->SizeOfSection.u.LowPart)
         {
-            (*ViewSize) = Section->MaximumSize.u.LowPart - ViewOffset;
+            (*ViewSize) = Section->SizeOfSection.u.LowPart - ViewOffset;
         }
 
         *ViewSize = PAGE_ROUND_UP(*ViewSize);
@@ -4869,11 +4869,11 @@ MmMapViewInSystemSpace (IN PVOID SectionObject,
 
     if ((*ViewSize) == 0)
     {
-        (*ViewSize) = Section->MaximumSize.u.LowPart;
+        (*ViewSize) = Section->SizeOfSection.u.LowPart;
     }
-    else if ((*ViewSize) > Section->MaximumSize.u.LowPart)
+    else if ((*ViewSize) > Section->SizeOfSection.u.LowPart)
     {
-        (*ViewSize) = Section->MaximumSize.u.LowPart;
+        (*ViewSize) = Section->SizeOfSection.u.LowPart;
     }
 
     MmLockSectionSegment(Section->Segment);
@@ -5132,7 +5132,7 @@ MmCreateSection (OUT PVOID  * Section,
         Status = MmCreateCacheSection(SectionObject,
                                       DesiredAccess,
                                       ObjectAttributes,
-                                      MaximumSize,
+                                      SizeOfSection,
                                       SectionPageProtection,
                                       AllocationAttributes,
                                       FileObject);

Reply via email to