From 2c31fcac600e76364d91090f3f09f3296f9e5b3e Mon Sep 17 00:00:00 2001 From: Hartmut Birr Date: Tue, 26 Jul 2005 19:38:33 +0000 Subject: [PATCH] Used IoQueryFileInformation and IoSetInformation instead of ZwQueryInformationFile and ZwSetInformationFile to remove some overhead. svn path=/trunk/; revision=16757 --- reactos/ntoskrnl/mm/section.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 094fba75825..b91c900d1b2 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -2308,11 +2308,11 @@ MmCreateDataFileSection(PSECTION_OBJECT *SectionObject, * (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 @@ MmCreateDataFileSection(PSECTION_OBJECT *SectionObject, 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);