/* Remove this directory entry node from the list of directory entries and hash table. */
EFI_STATUS FatRemoveDirEnt(IN FAT_OFILE *OFile, IN FAT_DIRENT *DirEnt)
/* Remove this directory entry node from the list of directory entries and hash table. */
EFI_STATUS FatRemoveDirEnt(IN FAT_OFILE *OFile, IN FAT_DIRENT *DirEnt)
{
  FAT_ODIR  *ODir;
  ODir = OFile->ODir;
  if (ODir->CurrentCursor == &DirEnt->Link) {
    ODir->CurrentCursor = ODir->CurrentCursor->BackLink;
  }
  RemoveEntryList (&DirEnt->Link);
  FatDeleteFromHashTable (ODir, DirEnt);
  DirEnt->Entry.FileName[0] = DELETE_ENTRY_MARK;
  DirEnt->Invalid           = TRUE;
  return FatStoreDirEnt (OFile, DirEnt);
}