Author: arty
Date: Wed Aug 27 11:12:03 2008
New Revision: 35706
URL:
http://svn.reactos.org/svn/reactos?rev=35706&view=rev
Log:
CcPurgeCacheSection now exists.
Add an ASSERT for wierd section sizes.
Modified:
branches/arty-newcc/drivers/filesystems/fastfat/cleanup.c
branches/arty-newcc/ntoskrnl/cache/pinsup.c
Modified: branches/arty-newcc/drivers/filesystems/fastfat/cleanup.c
URL:
http://svn.reactos.org/svn/reactos/branches/arty-newcc/drivers/filesystems/…
==============================================================================
--- branches/arty-newcc/drivers/filesystems/fastfat/cleanup.c [iso-8859-1] (original)
+++ branches/arty-newcc/drivers/filesystems/fastfat/cleanup.c [iso-8859-1] Wed Aug 27
11:12:03 2008
@@ -82,12 +82,7 @@
ObDereferenceObject(tmpFileObject);
}
-#if 0
- /* FIXME:
- * CcPurgeCacheSection is unimplemented.
- */
CcPurgeCacheSection(FileObject->SectionObjectPointer, NULL, 0, FALSE);
-#endif
}
/* Uninitialize file cache if. */
if (FileObject->SectionObjectPointer->SharedCacheMap)
Modified: branches/arty-newcc/ntoskrnl/cache/pinsup.c
URL:
http://svn.reactos.org/svn/reactos/branches/arty-newcc/ntoskrnl/cache/pinsu…
==============================================================================
--- branches/arty-newcc/ntoskrnl/cache/pinsup.c [iso-8859-1] (original)
+++ branches/arty-newcc/ntoskrnl/cache/pinsup.c [iso-8859-1] Wed Aug 27 11:12:03 2008
@@ -455,7 +455,8 @@
if (!SectionObject)
{
PNOCC_CACHE_MAP Map =
(PNOCC_CACHE_MAP)FileObject->SectionObjectPointer->SharedCacheMap;
- ULONG SectionSize = min(CACHE_STRIPE, Map->FileSizes.ValidDataLength.QuadPart -
Target.QuadPart);
+ LONG SectionSize = min(CACHE_STRIPE, Map->FileSizes.ValidDataLength.QuadPart -
Target.QuadPart);
+ ASSERT(SectionSize > 0 && SectionSize <= CACHE_STRIPE);
DPRINT("Allocating a cache stripe at %x:%d\n",
Target.LowPart, SectionSize);
Status = CcpAllocateSection