[NTOSKRNL] Drop ROS_DEFERRED_WRITE_CONTEXT in favor of DEFERRED_WRITE

that was introduced in d3e0eb2.

CORE-14235
This commit is contained in:
Pierre Schweitzer 2018-01-28 11:55:40 +01:00
parent 52287be9a9
commit b49a2d6356
No known key found for this signature in database
GPG key ID: 7545556C3D585B0B
3 changed files with 14 additions and 20 deletions

View file

@ -496,13 +496,13 @@ CcDeferWrite (
IN ULONG BytesToWrite,
IN BOOLEAN Retrying)
{
PROS_DEFERRED_WRITE_CONTEXT Context;
PDEFERRED_WRITE Context;
CCTRACE(CC_API_DEBUG, "FileObject=%p PostRoutine=%p Context1=%p Context2=%p BytesToWrite=%lu Retrying=%d\n",
FileObject, PostRoutine, Context1, Context2, BytesToWrite, Retrying);
/* Try to allocate a context for queueing the write operation */
Context = ExAllocatePoolWithTag(NonPagedPool, sizeof(ROS_DEFERRED_WRITE_CONTEXT), 'CcDw');
Context = ExAllocatePoolWithTag(NonPagedPool, sizeof(DEFERRED_WRITE), 'CcDw');
/* If it failed, immediately execute the operation! */
if (Context == NULL)
{
@ -511,26 +511,28 @@ CcDeferWrite (
}
/* Otherwise, initialize the context */
RtlZeroMemory(Context, sizeof(DEFERRED_WRITE));
Context->NodeTypeCode = NODE_TYPE_DEFERRED_WRITE;
Context->NodeByteSize = sizeof(DEFERRED_WRITE);
Context->FileObject = FileObject;
Context->PostRoutine = PostRoutine;
Context->Context1 = Context1;
Context->Context2 = Context2;
Context->BytesToWrite = BytesToWrite;
Context->Retrying = Retrying;
/* And queue it */
if (Retrying)
{
/* To the top, if that's a retry */
ExInterlockedInsertHeadList(&CcDeferredWrites,
&Context->CcDeferredWritesEntry,
&Context->DeferredWriteLinks,
&CcDeferredWriteSpinLock);
}
else
{
/* To the bottom, if that's a first time */
ExInterlockedInsertTailList(&CcDeferredWrites,
&Context->CcDeferredWritesEntry,
&Context->DeferredWriteLinks,
&CcDeferredWriteSpinLock);
}
}