diff --git a/src/sys/create.c b/src/sys/create.c index 0650990a..2a2b40bd 100644 --- a/src/sys/create.c +++ b/src/sys/create.c @@ -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; /* diff --git a/src/sys/filectx.c b/src/sys/filectx.c index 7444c0f4..c641072c 100644 --- a/src/sys/filectx.c +++ b/src/sys/filectx.c @@ -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;