https://git.reactos.org/?p=reactos.git;a=commitdiff;h=64bc96558e878cc91da148ec5892a7e2bf58e052

commit 64bc96558e878cc91da148ec5892a7e2bf58e052
Author: Pierre Schweitzer <[email protected]>
AuthorDate: Sun Dec 17 18:21:51 2017 +0100

    [FASTFAT] While closing FCBs on dismount, release from tail to head and not 
the contrary.
    It fixes assertion failure in vfatDestroyFCB() where we would have release 
parent before child.
    This is still not perfect, but less bug prone...
    
    With this commits (and ENABLE_SWAPOUT defined), ReactOS seems to unmount 
FAT volumes quite nice! :-)
    (Tried with fsutil volume dismount X:)
---
 drivers/filesystems/fastfat/fsctl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/filesystems/fastfat/fsctl.c 
b/drivers/filesystems/fastfat/fsctl.c
index f059410044..abd772648a 100644
--- a/drivers/filesystems/fastfat/fsctl.c
+++ b/drivers/filesystems/fastfat/fsctl.c
@@ -1203,7 +1203,7 @@ VfatDismountVolume(
     /* Rebrowse the FCB in order to free them now */
     while (!IsListEmpty(&DeviceExt->FcbListHead))
     {
-        NextEntry = RemoveHeadList(&DeviceExt->FcbListHead);
+        NextEntry = RemoveTailList(&DeviceExt->FcbListHead);
         Fcb = CONTAINING_RECORD(NextEntry, VFATFCB, FcbListEntry);
         vfatDestroyFCB(Fcb);
     }

Reply via email to