Author: tfaber
Date: Sat Apr 12 10:37:08 2014
New Revision: 62711

URL: http://svn.reactos.org/svn/reactos?rev=62711&view=rev
Log:
[NTOS:CC]
- Remove remnants of long-unused delayed remove/close feature (added in r3970, 
removed in r39663)

Modified:
    trunk/reactos/ntoskrnl/cc/view.c
    trunk/reactos/ntoskrnl/include/internal/cc.h
    trunk/reactos/ntoskrnl/mm/section.c

Modified: trunk/reactos/ntoskrnl/cc/view.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/view.c?rev=62711&r1=62710&r2=62711&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/cc/view.c    [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cc/view.c    [iso-8859-1] Sat Apr 12 10:37:08 2014
@@ -44,7 +44,6 @@
 static LIST_ENTRY DirtyVacbListHead;
 static LIST_ENTRY VacbListHead;
 static LIST_ENTRY VacbLruListHead;
-static LIST_ENTRY ClosedListHead;
 ULONG DirtyPageCount = 0;
 
 KGUARDED_MUTEX ViewLock;
@@ -1026,12 +1025,6 @@
     Bcb->RefCount--;
     if (Bcb->RefCount == 0)
     {
-        if (Bcb->BcbRemoveListEntry.Flink != NULL)
-        {
-            RemoveEntryList(&Bcb->BcbRemoveListEntry);
-            Bcb->BcbRemoveListEntry.Flink = NULL;
-        }
-
         FileObject->SectionObjectPointer->SharedCacheMap = NULL;
 
         /*
@@ -1082,37 +1075,23 @@
     KeAcquireGuardedMutex(&ViewLock);
     Bcb = (PBCB)FileObject->SectionObjectPointer->SharedCacheMap;
     ASSERT(Bcb);
-    if (Bcb->RefCount == 0)
-    {
-        ASSERT(Bcb->BcbRemoveListEntry.Flink != NULL);
-        RemoveEntryList(&Bcb->BcbRemoveListEntry);
-        Bcb->BcbRemoveListEntry.Flink = NULL;
-
-    }
-    else
-    {
-        ASSERT(Bcb->BcbRemoveListEntry.Flink == NULL);
-    }
+    ASSERT(Bcb->RefCount != 0);
     Bcb->RefCount++;
     KeReleaseGuardedMutex(&ViewLock);
 }
 
 VOID
 NTAPI
-CcRosSetRemoveOnClose (
+CcRosRemoveIfClosed (
     PSECTION_OBJECT_POINTERS SectionObjectPointer)
 {
     PBCB Bcb;
-    DPRINT("CcRosSetRemoveOnClose()\n");
+    DPRINT("CcRosRemoveIfClosed()\n");
     KeAcquireGuardedMutex(&ViewLock);
     Bcb = (PBCB)SectionObjectPointer->SharedCacheMap;
-    if (Bcb)
-    {
-        Bcb->RemoveOnClose = TRUE;
-        if (Bcb->RefCount == 0)
-        {
-            CcRosDeleteFileCache(Bcb->FileObject, Bcb);
-        }
+    if (Bcb && Bcb->RefCount == 0)
+    {
+        CcRosDeleteFileCache(Bcb->FileObject, Bcb);
     }
     KeReleaseGuardedMutex(&ViewLock);
 }
@@ -1196,11 +1175,6 @@
             FileObject->PrivateCacheMap = Bcb;
             Bcb->RefCount++;
         }
-        if (Bcb->BcbRemoveListEntry.Flink != NULL)
-        {
-            RemoveEntryList(&Bcb->BcbRemoveListEntry);
-            Bcb->BcbRemoveListEntry.Flink = NULL;
-        }
         Status = STATUS_SUCCESS;
     }
     KeReleaseGuardedMutex(&ViewLock);
@@ -1258,11 +1232,6 @@
         FileObject->PrivateCacheMap = Bcb;
         Bcb->RefCount++;
     }
-    if (Bcb->BcbRemoveListEntry.Flink != NULL)
-    {
-        RemoveEntryList(&Bcb->BcbRemoveListEntry);
-        Bcb->BcbRemoveListEntry.Flink = NULL;
-    }
     KeReleaseGuardedMutex(&ViewLock);
 
     return STATUS_SUCCESS;
@@ -1297,7 +1266,6 @@
     InitializeListHead(&VacbListHead);
     InitializeListHead(&DirtyVacbListHead);
     InitializeListHead(&VacbLruListHead);
-    InitializeListHead(&ClosedListHead);
     KeInitializeGuardedMutex(&ViewLock);
     ExInitializeNPagedLookasideList (&iBcbLookasideList,
                                      NULL,

Modified: trunk/reactos/ntoskrnl/include/internal/cc.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/cc.h?rev=62711&r1=62710&r2=62711&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/cc.h        [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/cc.h        [iso-8859-1] Sat Apr 12 
10:37:08 2014
@@ -104,8 +104,6 @@
 typedef struct _BCB
 {
     LIST_ENTRY BcbVacbListHead;
-    LIST_ENTRY BcbRemoveListEntry;
-    BOOLEAN RemoveOnClose;
     ULONG TimeStamp;
     PFILE_OBJECT FileObject;
     LARGE_INTEGER AllocationSize;
@@ -264,7 +262,7 @@
 
 VOID
 NTAPI
-CcRosSetRemoveOnClose(PSECTION_OBJECT_POINTERS SectionObjectPointer);
+CcRosRemoveIfClosed(PSECTION_OBJECT_POINTERS SectionObjectPointer);
 
 NTSTATUS
 NTAPI

Modified: trunk/reactos/ntoskrnl/mm/section.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=62711&r1=62710&r2=62711&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Sat Apr 12 10:37:08 2014
@@ -4720,7 +4720,7 @@
             return FALSE;
          }
 #ifndef NEWCC
-         CcRosSetRemoveOnClose(SectionObjectPointer);
+         CcRosRemoveIfClosed(SectionObjectPointer);
 #endif
          return TRUE;
       case MmFlushForWrite:


Reply via email to