update for HEAD-2003050101
[reactos.git] / drivers / fs / cdfs / cleanup.c
index 4f0a71a..a2eec26 100644 (file)
@@ -45,23 +45,16 @@ CdfsCleanupFile(PDEVICE_EXTENSION DeviceExt,
  * FUNCTION: Cleans up after a file has been closed.
  */
 {
-  PCCB Ccb;
 
   DPRINT("CdfsCleanupFile(DeviceExt %x, FileObject %x)\n",
         DeviceExt,
         FileObject);
 
 
-  Ccb = (PCCB) (FileObject->FsContext2);
-  if (Ccb == NULL)
-    {
-      return  STATUS_SUCCESS;
-    }
-
   /* Uninitialize file cache if initialized for this file object. */
-  if (Ccb->Fcb->RFCB.Bcb != NULL)
+  if (FileObject->SectionObjectPointers && FileObject->SectionObjectPointers->SharedCacheMap)
     {
-      CcRosReleaseFileCache (FileObject, Ccb->Fcb->RFCB.Bcb);
+      CcRosReleaseFileCache (FileObject);
     }
  
   return STATUS_SUCCESS;