/* Clean up all the cached directory structures when the volume is going to be abandoned. */
VOID FatCleanupODirCache(IN FAT_VOLUME *Volume)
/* Clean up all the cached directory structures when the volume is going to be abandoned. */
VOID FatCleanupODirCache(IN FAT_VOLUME *Volume)
{
  FAT_ODIR  *ODir;
  while (Volume->DirCacheCount > 0) {
    ODir = ODIR_FROM_DIRCACHELINK (Volume->DirCacheList.BackLink);
    RemoveEntryList (&ODir->DirCacheLink);
    FatFreeODir (ODir);
    Volume->DirCacheCount--;
  }
}