https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f8c3f0c9c4f5e217c6a46…
commit f8c3f0c9c4f5e217c6a46420f4e4e5ed1e82cd88
Author: Pierre Schweitzer <pierre(a)reactos.org>
AuthorDate: Thu Feb 8 11:02:07 2018 +0100
Commit: Pierre Schweitzer <pierre(a)reactos.org>
CommitDate: Thu Feb 8 11:02:26 2018 +0100
[NTOSKRNL] Misc cosmetic changes
---
ntoskrnl/cc/fs.c | 2 +-
ntoskrnl/cc/view.c | 4 +++-
ntoskrnl/include/internal/cc.h | 23 ++++++++++++++---------
3 files changed, 18 insertions(+), 11 deletions(-)
diff --git a/ntoskrnl/cc/fs.c b/ntoskrnl/cc/fs.c
index fddf76079a..7be40ae82b 100644
--- a/ntoskrnl/cc/fs.c
+++ b/ntoskrnl/cc/fs.c
@@ -362,7 +362,7 @@ CcUninitializeCacheMap (
/* And free it */
FileObject->PrivateCacheMap = NULL;
- ExFreePoolWithTag(PrivateMap, 'cPcC');
+ ExFreePoolWithTag(PrivateMap, TAG_PRIVATE_CACHE_MAP);
}
Status = CcRosReleaseFileCache(FileObject);
diff --git a/ntoskrnl/cc/view.c b/ntoskrnl/cc/view.c
index 4933665bd1..0d6d51b2f8 100644
--- a/ntoskrnl/cc/view.c
+++ b/ntoskrnl/cc/view.c
@@ -1233,6 +1233,8 @@ CcRosInitializeFileCache (
FILE_ALL_ACCESS,
NULL,
KernelMode);
+ SharedCacheMap->NodeTypeCode = NODE_TYPE_SHARED_MAP;
+ SharedCacheMap->NodeByteSize = sizeof(*SharedCacheMap);
SharedCacheMap->FileObject = FileObject;
SharedCacheMap->Callbacks = CallBacks;
SharedCacheMap->LazyWriteContext = LazyWriterContext;
@@ -1255,7 +1257,7 @@ CcRosInitializeFileCache (
PPRIVATE_CACHE_MAP PrivateMap;
/* Allocate the private cache map for this handle */
- PrivateMap = ExAllocatePoolWithTag(NonPagedPool, sizeof(PRIVATE_CACHE_MAP),
'cPcC');
+ PrivateMap = ExAllocatePoolWithTag(NonPagedPool, sizeof(PRIVATE_CACHE_MAP),
TAG_PRIVATE_CACHE_MAP);
if (PrivateMap == NULL)
{
/* If we also allocated the shared cache map for this file, kill it */
diff --git a/ntoskrnl/include/internal/cc.h b/ntoskrnl/include/internal/cc.h
index 9679255697..63b6bc44f1 100644
--- a/ntoskrnl/include/internal/cc.h
+++ b/ntoskrnl/include/internal/cc.h
@@ -155,20 +155,24 @@ typedef struct _PFSN_PREFETCHER_GLOBALS
typedef struct _ROS_SHARED_CACHE_MAP
{
- LIST_ENTRY CacheMapVacbListHead;
- ULONG TimeStamp;
- PFILE_OBJECT FileObject;
- LARGE_INTEGER SectionSize;
+ CSHORT NodeTypeCode;
+ CSHORT NodeByteSize;
+ ULONG OpenCount;
LARGE_INTEGER FileSize;
- BOOLEAN PinAccess;
+ LARGE_INTEGER SectionSize;
+ PFILE_OBJECT FileObject;
+ ULONG DirtyPages;
+ LIST_ENTRY SharedCacheMapLinks;
PCACHE_MANAGER_CALLBACKS Callbacks;
PVOID LazyWriteContext;
LIST_ENTRY PrivateList;
- KSPIN_LOCK CacheMapLock;
- ULONG OpenCount;
- ULONG DirtyPages;
- LIST_ENTRY SharedCacheMapLinks;
ULONG DirtyPageThreshold;
+
+ /* ROS specific */
+ LIST_ENTRY CacheMapVacbListHead;
+ ULONG TimeStamp;
+ BOOLEAN PinAccess;
+ KSPIN_LOCK CacheMapLock;
#if DBG
BOOLEAN Trace; /* enable extra trace output for this cache map and it's VACBs */
#endif
@@ -257,6 +261,7 @@ extern LAZY_WRITER LazyWriter;
#define NODE_TYPE_DEFERRED_WRITE 0x02FC
#define NODE_TYPE_PRIVATE_MAP 0x02FE
+#define NODE_TYPE_SHARED_MAP 0x02FF
VOID
NTAPI