sys: fileinfo: call MmCanFileBeTruncated only when truncating (allows file mappings to be created)

sys: util.c: FspGetMdlAddress()
This commit is contained in:
Bill Zissimopoulos
2016-03-16 16:17:22 -07:00
parent fc7c709e5f
commit 26d2d51117
3 changed files with 52 additions and 12 deletions

View File

@ -472,6 +472,10 @@ VOID FspFileNodeCleanupComplete(FSP_FILE_NODE *FileNode, PFILE_OBJECT FileObject
}
else if (FileNode->TruncateOnClose && FlagOn(FileObject->Flags, FO_CACHE_SUPPORTED))
{
/*
* Even when the FileInfo is expired, this is the best guess for a file size
* without asking the user-mode file system.
*/
TruncateSize = FileNode->Header.FileSize;
PTruncateSize = &TruncateSize;
}