- Correctly check for write quota in NpCommonWrite. Should fix test regressions after enabling fast I/O.

svn path=/trunk/; revision=67503
This commit is contained in:
Thomas Faber 2015-05-01 19:40:04 +00:00
parent 8ce4d75f45
commit 5f7df0d9ad

View file

@ -104,10 +104,10 @@ NpCommonWrite(IN PFILE_OBJECT FileObject,
EventBuffer = NonPagedCcb->EventBuffer[NamedPipeEnd];
if ((WriteQueue->QueueState == ReadEntries &&
WriteQueue->BytesInQueue < DataSize &&
WriteQueue->Quota < DataSize - WriteQueue->BytesInQueue) ||
(WriteQueue->QueueState == ReadEntries &&
WriteQueue->Quota - WriteQueue->QuotaUsed < DataSize))
WriteQueue->BytesInQueue < DataSize &&
WriteQueue->Quota < DataSize - WriteQueue->BytesInQueue) ||
(WriteQueue->QueueState != ReadEntries &&
WriteQueue->Quota - WriteQueue->QuotaUsed < DataSize))
{
if (Ccb->Fcb->NamedPipeType == FILE_PIPE_MESSAGE_TYPE &&
Ccb->CompletionMode[NamedPipeEnd] == FILE_PIPE_COMPLETE_OPERATION)