mirror of
https://github.com/winfsp/winfsp.git
synced 2025-07-03 09:22:57 -05:00
sys: IRP_MJ_READ: remove FspFileNodeTrySetFileInfo at completion
sys: IRP_MJ_READ: remove PagingIo early exit optimization sys: IRP_MJ_WRITE: remove PagingIo early exit optimization
This commit is contained in:
@ -258,7 +258,6 @@ static NTSTATUS FspFsvolWriteNonCached(
|
||||
BOOLEAN WriteToEndOfFile =
|
||||
FILE_WRITE_TO_END_OF_FILE == WriteOffset.LowPart && -1L == WriteOffset.HighPart;
|
||||
BOOLEAN PagingIo = BooleanFlagOn(Irp->Flags, IRP_PAGING_IO);
|
||||
FSP_FSCTL_FILE_INFO FileInfo;
|
||||
FSP_FSCTL_TRANSACT_REQ *Request;
|
||||
BOOLEAN Success;
|
||||
|
||||
@ -276,13 +275,6 @@ static NTSTATUS FspFsvolWriteNonCached(
|
||||
if (FspIoqStopped(FspFsvolDeviceExtension(FsvolDeviceObject)->Ioq))
|
||||
return FspFsvolDeviceStoppedStatus(FsvolDeviceObject);
|
||||
|
||||
/* if this is a Paging I/O see if we can optimize it away! */
|
||||
if (PagingIo && /* if this is Paging I/O */
|
||||
FlagOn(FspIrpTopFlags(Irp), FspFileNodeAcquireMain) && /* and TopLevelIrp has acquired Main */
|
||||
FspFileNodeTryGetFileInfo(FileNode, &FileInfo) && /* and the cached FileSize is valid */
|
||||
(UINT64)WriteOffset.QuadPart >= FileInfo.FileSize) /* and the WriteOffset is past EOF */
|
||||
return STATUS_SUCCESS;
|
||||
|
||||
/* probe and lock the user buffer */
|
||||
Result = FspLockUserBuffer(Irp, WriteLength, IoReadAccess);
|
||||
if (!NT_SUCCESS(Result))
|
||||
|
Reference in New Issue
Block a user