Author: fireball
Date: Tue Dec 1 22:32:50 2009
New Revision: 44349
URL:
http://svn.reactos.org/svn/reactos?rev=44349&view=rev
Log:
[ntoskrnl/cc]
- Don't create zero sized cache segments. By Dmitry Gorbachev.
See issue #4100 for more details.
Modified:
trunk/reactos/ntoskrnl/cc/fs.c
Modified: trunk/reactos/ntoskrnl/cc/fs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/fs.c?rev=44349…
==============================================================================
--- trunk/reactos/ntoskrnl/cc/fs.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cc/fs.c [iso-8859-1] Tue Dec 1 22:32:50 2009
@@ -166,7 +166,8 @@
{
current = CONTAINING_RECORD(current_entry, CACHE_SEGMENT, BcbSegmentListEntry);
current_entry = current_entry->Flink;
- if (current->FileOffset > FileSizes->AllocationSize.QuadPart)
+ if (current->FileOffset > FileSizes->AllocationSize.QuadPart ||
+ (current->FileOffset == 0 && FileSizes->AllocationSize.QuadPart ==
0))
{
if (current->ReferenceCount == 0 || (current->ReferenceCount == 1
&& current->Dirty))
{