sys: create: disable ValidDataLength functionality

This commit is contained in:
Bill Zissimopoulos 2016-01-04 23:49:56 -08:00
parent 483e39f196
commit 2e5b7dc716
2 changed files with 3 additions and 2 deletions

View File

@ -383,8 +383,7 @@ VOID FspFsvolCreateComplete(
Request = FspIrpRequest(Irp);
FsContext = FspIopRequestContext(Request, RequestFsContext);
FsContext->Header.AllocationSize.QuadPart = Response->Rsp.Create.Opened.AllocationSize;
FsContext->Header.FileSize.QuadPart = FsContext->Header.ValidDataLength.QuadPart =
Response->Rsp.Create.Opened.AllocationSize;
FsContext->Header.FileSize.QuadPart = Response->Rsp.Create.Opened.AllocationSize;
FsContext->UserContext = Response->Rsp.Create.Opened.UserContext;
/*

View File

@ -44,6 +44,8 @@ NTSTATUS FspFileContextCreate(PDEVICE_OBJECT DeviceObject,
FsContext->Header.IsFastIoPossible = FastIoIsQuestionable;
FsContext->Header.Resource = &NonPaged->Resource;
FsContext->Header.PagingIoResource = &NonPaged->PagingIoResource;
FsContext->Header.ValidDataLength.QuadPart = 0x7fffffffffffffffLL;
/* disable ValidDataLength functionality */
FsRtlSetupAdvancedHeader(&FsContext->Header, &NonPaged->HeaderFastMutex);
FsContext->NonPaged = NonPaged;
FsContext->RefCount = 1;