Hey Pierre!
This flag
  +    if (DeviceExt->VolumeFcb->Flags &
VCB_CLEAR_DIRTY)
 +    {
 +        /* Set clean shutdown bit */
 +        Status = GetNextCluster(DeviceExt, 1, &eocMark);
 +        if (NT_SUCCESS(Status))
 +        {
 +            eocMark |= DeviceExt->CleanShutBitMask;
 +            if (NT_SUCCESS(WriteCluster(DeviceExt, 1, eocMark))) 
and that one
  +                DeviceExt->VolumeFcb->Flags
&= ~VCB_IS_DIRTY;
 +        }
 +    }
 +
      /* Flush volume & files */
      VfatFlushVolume(DeviceExt, (PVFATFCB)FileObject->FsContext);
  
don't really seem to match. Or is the former a part of a OR combination
defining the latter ?
Cheers.
Jérôme.