Author: pschweitzer
Date: Fri Nov 11 10:44:51 2016
New Revision: 73200
URL: http://svn.reactos.org/svn/reactos?rev=73200&view=rev
Log:
[KMTESTS:MM]
Bugfix for IRP_MJ_SET_INFORMATION/FileEndOfFileInformation: really set the information. The test still works fine in Windows and still fails hard in ReactOS.
Modified:
trunk/rostests/kmtests/ntos_mm/NtCreateSection_drv.c
Modified: trunk/rostests/kmtests/ntos_mm/NtCreateSection_drv.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/kmtests/ntos_mm/NtCreateS…
==============================================================================
--- trunk/rostests/kmtests/ntos_mm/NtCreateSection_drv.c [iso-8859-1] (original)
+++ trunk/rostests/kmtests/ntos_mm/NtCreateSection_drv.c [iso-8859-1] Fri Nov 11 10:44:51 2016
@@ -477,6 +477,7 @@
ok_bool_false(IoStack->Parameters.SetFile.AdvanceOnly, "AdvanceOnly set!\n");
ok(EOFInfo->EndOfFile.QuadPart > Fcb->Header.AllocationSize.QuadPart, "New size smaller\n");
+ Fcb->Header.AllocationSize.QuadPart = EOFInfo->EndOfFile.QuadPart;
if (CcIsFileCached(IoStack->FileObject))
{
CcSetFileSizes(IoStack->FileObject, (PCC_FILE_SIZES)(&(Fcb->Header.AllocationSize)));
Author: pschweitzer
Date: Thu Nov 10 21:17:21 2016
New Revision: 73199
URL: http://svn.reactos.org/svn/reactos?rev=73199&view=rev
Log:
[NTOSKRNL]
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.
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=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Thu Nov 10 21:17:21 2016
@@ -2998,7 +2998,7 @@
if (MaximumSize.QuadPart > FileInfo.EndOfFile.QuadPart)
{
Status = IoSetInformation(FileObject,
- FileAllocationInformation,
+ FileEndOfFileInformation,
sizeof(LARGE_INTEGER),
&MaximumSize);
if (!NT_SUCCESS(Status))