[NPFS]
authorThomas Faber <thomas.faber@reactos.org>
Fri, 1 May 2015 19:40:04 +0000 (19:40 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Fri, 1 May 2015 19:40:04 +0000 (19:40 +0000)
- Correctly check for write quota in NpCommonWrite. Should fix test regressions after enabling fast I/O.

svn path=/trunk/; revision=67503

reactos/drivers/filesystems/npfs/write.c

index 7297a5b..c2dd5f6 100644 (file)
@@ -104,10 +104,10 @@ NpCommonWrite(IN PFILE_OBJECT FileObject,
     EventBuffer = NonPagedCcb->EventBuffer[NamedPipeEnd];
 
     if ((WriteQueue->QueueState == ReadEntries &&
     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)
     {
         if (Ccb->Fcb->NamedPipeType == FILE_PIPE_MESSAGE_TYPE &&
             Ccb->CompletionMode[NamedPipeEnd] == FILE_PIPE_COMPLETE_OPERATION)