[FASTFAT]
authorThomas Faber <thomas.faber@reactos.org>
Sat, 1 Nov 2014 18:00:15 +0000 (18:00 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sat, 1 Nov 2014 18:00:15 +0000 (18:00 +0000)
- The volume FCB is not reference counted, so don't dereference it on close.

svn path=/trunk/; revision=65171

reactos/drivers/filesystems/fastfat/close.c
reactos/drivers/filesystems/fastfat/fcb.c

index 3ad1a9f..4e8ce3f 100644 (file)
@@ -42,7 +42,6 @@ VfatCloseFile(
     if (pFcb->Flags & FCB_IS_VOLUME)
     {
         DPRINT1("Volume\n");
-        pFcb->RefCount--;
         FileObject->FsContext2 = NULL;
     }
     else
index c698ba7..d443be3 100644 (file)
@@ -294,6 +294,7 @@ vfatGrabFCB(
 {
     ASSERT(ExIsResourceAcquiredExclusive(&pVCB->DirResource));
 
+    ASSERT(pFCB != pVCB->VolumeFcb);
     ++pFCB->RefCount;
 }
 
@@ -311,6 +312,7 @@ vfatReleaseFCB(
 
     while (pFCB)
     {
+        ASSERT(pFCB != pVCB->VolumeFcb);
         pFCB->RefCount--;
         if (pFCB->RefCount == 0)
         {