mirror of
https://github.com/reactos/reactos.git
synced 2025-07-31 13:51:55 +00:00
[NTOSKRNL] Drop ROS_DEFERRED_WRITE_CONTEXT in favor of DEFERRED_WRITE
that was introduced in d3e0eb2
.
CORE-14235
This commit is contained in:
parent
52287be9a9
commit
b49a2d6356
3 changed files with 14 additions and 20 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue