Author: tfaber
Date: Sun Aug 17 21:47:43 2014
New Revision: 63901
URL:
http://svn.reactos.org/svn/reactos?rev=63901&view=rev
Log:
[NTOS:CC]
- Use the passed-in file sizes in CcInitializeCacheMap
Modified:
trunk/reactos/ntoskrnl/cc/fs.c
trunk/reactos/ntoskrnl/cc/view.c
trunk/reactos/ntoskrnl/include/internal/cc.h
Modified: trunk/reactos/ntoskrnl/cc/fs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/fs.c?rev=63901…
==============================================================================
--- trunk/reactos/ntoskrnl/cc/fs.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cc/fs.c [iso-8859-1] Sun Aug 17 21:47:43 2014
@@ -87,6 +87,7 @@
/* Call old ROS cache init function */
CcRosInitializeFileCache(FileObject,
+ FileSizes,
CallBacks,
LazyWriterContext);
}
Modified: trunk/reactos/ntoskrnl/cc/view.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/view.c?rev=639…
==============================================================================
--- trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] Sun Aug 17 21:47:43 2014
@@ -1187,6 +1187,7 @@
NTAPI
CcRosInitializeFileCache (
PFILE_OBJECT FileObject,
+ PCC_FILE_SIZES FileSizes,
PCACHE_MANAGER_CALLBACKS CallBacks,
PVOID LazyWriterContext)
/*
@@ -1216,13 +1217,8 @@
SharedCacheMap->FileObject = FileObject;
SharedCacheMap->Callbacks = CallBacks;
SharedCacheMap->LazyWriteContext = LazyWriterContext;
- if (FileObject->FsContext)
- {
- SharedCacheMap->SectionSize =
- ((PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext)->AllocationSize;
- SharedCacheMap->FileSize =
- ((PFSRTL_COMMON_FCB_HEADER)FileObject->FsContext)->FileSize;
- }
+ SharedCacheMap->SectionSize = FileSizes->AllocationSize;
+ SharedCacheMap->FileSize = FileSizes->FileSize;
KeInitializeSpinLock(&SharedCacheMap->CacheMapLock);
InitializeListHead(&SharedCacheMap->CacheMapVacbListHead);
FileObject->SectionObjectPointer->SharedCacheMap = SharedCacheMap;
Modified: trunk/reactos/ntoskrnl/include/internal/cc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/cc.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/cc.h [iso-8859-1] Sun Aug 17 21:47:43 2014
@@ -287,6 +287,7 @@
NTAPI
CcRosInitializeFileCache(
PFILE_OBJECT FileObject,
+ PCC_FILE_SIZES FileSizes,
PCACHE_MANAGER_CALLBACKS CallBacks,
PVOID LazyWriterContext
);