mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-01 04:13:35 +00:00
- Make use of the implemented transfer counter.
svn path=/trunk/; revision=41359
This commit is contained in:
@@ -92,7 +92,7 @@ IopUpdateOperationCount(IN IOP_TRANSFER_TYPE Type)
|
||||
static
|
||||
__inline
|
||||
VOID
|
||||
IopUpdateTransferCount(IN IOP_TRANSFER_TYPE Type, IN ULONG TransferCount)
|
||||
IopUpdateTransferCount(IN IOP_TRANSFER_TYPE Type, IN ULONG_PTR TransferCount)
|
||||
{
|
||||
PLARGE_INTEGER CountToChange;
|
||||
PLARGE_INTEGER TransferToChange;
|
||||
|
||||
@@ -2354,6 +2354,9 @@ NtSetInformationFile(IN HANDLE FileHandle,
|
||||
}
|
||||
_SEH2_END;
|
||||
|
||||
/* Update transfer count */
|
||||
IopUpdateTransferCount(IopOtherTransfer, Length);
|
||||
|
||||
/* Release the file lock, dereference the file and return */
|
||||
IopUnlockFileObject(FileObject);
|
||||
ObDereferenceObject(FileObject);
|
||||
|
||||
@@ -393,6 +393,29 @@ IopCompleteRequest(IN PKAPC Apc,
|
||||
}
|
||||
}
|
||||
|
||||
/* Update transfer count for everything but create operation */
|
||||
if (!(Irp->Flags & IRP_CREATE_OPERATION))
|
||||
{
|
||||
if (Irp->Flags & IRP_WRITE_OPERATION)
|
||||
{
|
||||
/* Update write transfer count */
|
||||
IopUpdateTransferCount(IopWriteTransfer,
|
||||
Irp->IoStatus.Information);
|
||||
}
|
||||
else if (Irp->Flags & IRP_READ_OPERATION)
|
||||
{
|
||||
/* Update read transfer count */
|
||||
IopUpdateTransferCount(IopReadTransfer,
|
||||
Irp->IoStatus.Information);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Update other transfer count */
|
||||
IopUpdateTransferCount(IopOtherTransfer,
|
||||
Irp->IoStatus.Information);
|
||||
}
|
||||
}
|
||||
|
||||
/* Now that we've signaled the events, de-associate the IRP */
|
||||
IopUnQueueIrpFromThread(Irp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user