[NTOSKRNL]
authorPierre Schweitzer <pierre@reactos.org>
Thu, 10 Nov 2016 21:17:21 +0000 (21:17 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Thu, 10 Nov 2016 21:17:21 +0000 (21:17 +0000)
In MmCreateDataFileSection(), when maximum size is higher than file size, don't deal with its allocation size, just move EOF.
This was shown by NtCreateSection() tests.

svn path=/trunk/; revision=73199

reactos/ntoskrnl/mm/section.c

index 96295ed..31f5482 100644 (file)
@@ -2998,7 +2998,7 @@ MmCreateDataFileSection(PROS_SECTION_OBJECT *SectionObject,
     if (MaximumSize.QuadPart > FileInfo.EndOfFile.QuadPart)
     {
         Status = IoSetInformation(FileObject,
-                                  FileAllocationInformation,
+                                  FileEndOfFileInformation,
                                   sizeof(LARGE_INTEGER),
                                   &MaximumSize);
         if (!NT_SUCCESS(Status))