[FASTFAT]
[reactos.git] / reactos / drivers / filesystems / fastfat / cleanup.c
index 97c2515..f9bde77 100644 (file)
@@ -24,6 +24,7 @@ VfatCleanupFile(
     PVFAT_IRP_CONTEXT IrpContext)
 {
     PVFATFCB pFcb;
+    PDEVICE_EXTENSION DeviceExt = IrpContext->DeviceExt;
     PFILE_OBJECT FileObject = IrpContext->FileObject;
 
     DPRINT("VfatCleanupFile(DeviceExt %p, FileObject %p)\n",
@@ -37,6 +38,7 @@ VfatCleanupFile(
     if (pFcb->Flags & FCB_IS_VOLUME)
     {
         pFcb->OpenHandleCount--;
+        DeviceExt->OpenHandleCount--;
 
         if (pFcb->OpenHandleCount != 0)
         {
@@ -63,6 +65,7 @@ VfatCleanupFile(
                            FileObject->FsContext2);
 
         pFcb->OpenHandleCount--;
+        DeviceExt->OpenHandleCount--;
 
         if (!(*pFcb->Attributes & FILE_ATTRIBUTE_DIRECTORY) &&
             FsRtlAreThereCurrentFileLocks(&pFcb->FileLock))