diff --git a/ntoskrnl/cc/fs.c b/ntoskrnl/cc/fs.c index fddf76079a3..7be40ae82b4 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 4933665bd11..0d6d51b2f8e 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 96792556971..63b6bc44f18 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