Author: tfaber
Date: Sun Apr 16 08:50:20 2017
New Revision: 74322
URL:
http://svn.reactos.org/svn/reactos?rev=74322&view=rev
Log:
[NTOS:CC]
- Rename ROS_SHARED_CACHE_MAP::RefCount to OpenCount. One step closer to the real
SHARED_CACHE_MAP.
CORE-8065
Modified:
trunk/reactos/ntoskrnl/cc/view.c
trunk/reactos/ntoskrnl/include/internal/cc.h
Modified: trunk/reactos/ntoskrnl/cc/view.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/view.c?rev=743…
==============================================================================
--- trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] Sun Apr 16 08:50:20 2017
@@ -982,14 +982,14 @@
ASSERT(SharedCacheMap);
- SharedCacheMap->RefCount++;
+ SharedCacheMap->OpenCount++;
KeReleaseGuardedMutex(&ViewLock);
CcFlushCache(FileObject->SectionObjectPointer, NULL, 0, NULL);
KeAcquireGuardedMutex(&ViewLock);
- SharedCacheMap->RefCount--;
- if (SharedCacheMap->RefCount == 0)
+ SharedCacheMap->OpenCount--;
+ if (SharedCacheMap->OpenCount == 0)
{
FileObject->SectionObjectPointer->SharedCacheMap = NULL;
@@ -1040,8 +1040,8 @@
KeAcquireGuardedMutex(&ViewLock);
SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
ASSERT(SharedCacheMap);
- ASSERT(SharedCacheMap->RefCount != 0);
- SharedCacheMap->RefCount++;
+ ASSERT(SharedCacheMap->OpenCount != 0);
+ SharedCacheMap->OpenCount++;
KeReleaseGuardedMutex(&ViewLock);
}
@@ -1054,7 +1054,7 @@
DPRINT("CcRosRemoveIfClosed()\n");
KeAcquireGuardedMutex(&ViewLock);
SharedCacheMap = SectionObjectPointer->SharedCacheMap;
- if (SharedCacheMap && SharedCacheMap->RefCount == 0)
+ if (SharedCacheMap && SharedCacheMap->OpenCount == 0)
{
CcRosDeleteFileCache(SharedCacheMap->FileObject, SharedCacheMap);
}
@@ -1071,10 +1071,10 @@
KeAcquireGuardedMutex(&ViewLock);
SharedCacheMap = FileObject->SectionObjectPointer->SharedCacheMap;
ASSERT(SharedCacheMap);
- if (SharedCacheMap->RefCount > 0)
- {
- SharedCacheMap->RefCount--;
- if (SharedCacheMap->RefCount == 0)
+ if (SharedCacheMap->OpenCount > 0)
+ {
+ SharedCacheMap->OpenCount--;
+ if (SharedCacheMap->OpenCount == 0)
{
MmFreeSectionSegments(SharedCacheMap->FileObject);
CcRosDeleteFileCache(FileObject, SharedCacheMap);
@@ -1102,10 +1102,10 @@
if (FileObject->PrivateCacheMap != NULL)
{
FileObject->PrivateCacheMap = NULL;
- if (SharedCacheMap->RefCount > 0)
+ if (SharedCacheMap->OpenCount > 0)
{
- SharedCacheMap->RefCount--;
- if (SharedCacheMap->RefCount == 0)
+ SharedCacheMap->OpenCount--;
+ if (SharedCacheMap->OpenCount == 0)
{
MmFreeSectionSegments(SharedCacheMap->FileObject);
CcRosDeleteFileCache(FileObject, SharedCacheMap);
@@ -1138,7 +1138,7 @@
if (FileObject->PrivateCacheMap == NULL)
{
FileObject->PrivateCacheMap = SharedCacheMap;
- SharedCacheMap->RefCount++;
+ SharedCacheMap->OpenCount++;
}
Status = STATUS_SUCCESS;
}
@@ -1193,7 +1193,7 @@
if (FileObject->PrivateCacheMap == NULL)
{
FileObject->PrivateCacheMap = SharedCacheMap;
- SharedCacheMap->RefCount++;
+ SharedCacheMap->OpenCount++;
}
KeReleaseGuardedMutex(&ViewLock);
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 Apr 16 08:50:20 2017
@@ -153,7 +153,7 @@
PCACHE_MANAGER_CALLBACKS Callbacks;
PVOID LazyWriteContext;
KSPIN_LOCK CacheMapLock;
- ULONG RefCount;
+ ULONG OpenCount;
#if DBG
BOOLEAN Trace; /* enable extra trace output for this cache map and it's VACBs */
#endif