mirror of
https://github.com/reactos/reactos.git
synced 2024-07-12 15:45:20 +00:00
Used IoQueryFileInformation and IoSetInformation instead of ZwQueryInformationFile and ZwSetInformationFile to remove some overhead.
svn path=/trunk/; revision=16757
This commit is contained in:
parent
522a0e59cd
commit
2c31fcac60
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue