Used IoQueryFileInformation and IoSetInformation instead of ZwQueryInformationFile and ZwSetInformationFile to remove some overhead. Modified: trunk/reactos/ntoskrnl/mm/section.c _____
Modified: trunk/reactos/ntoskrnl/mm/section.c --- trunk/reactos/ntoskrnl/mm/section.c 2005-07-26 19:35:22 UTC (rev 16756) +++ trunk/reactos/ntoskrnl/mm/section.c 2005-07-26 19:38:33 UTC (rev 16757) @@ -2308,11 +2308,11 @@
* (as in case of the EXT2FS driver by Manoj Paul Joseph where the * standard file information is filled on first request). */ - Status = ZwQueryInformationFile(FileHandle, - &Iosb, - &FileInfo, + Status = IoQueryFileInformation(FileObject, + FileStandardInformation, sizeof(FILE_STANDARD_INFORMATION), - FileStandardInformation); + &FileInfo, + &Iosb.Information); if (!NT_SUCCESS(Status)) { ObDereferenceObject(Section); @@ -2342,11 +2342,10 @@
if (MaximumSize.QuadPart > FileInfo.EndOfFile.QuadPart) { - Status = ZwSetInformationFile(FileHandle, - &Iosb, - &MaximumSize, - sizeof(LARGE_INTEGER), - FileAllocationInformation); + Status = IoSetInformation(FileObject, + FileAllocationInformation, + sizeof(LARGE_INTEGER), + &MaximumSize); if (!NT_SUCCESS(Status)) { ObDereferenceObject(Section);