MiReferenceSubsection

NTSTATUS __fastcall MiReferenceSubsection(_SUBSECTION *Subsection, UINT64 Flags){
  _CONTROL_AREA *ControlArea; 
  void *Object; 
  int v5; 

  ControlArea = Subsection->ControlArea;
  if( !Subsection->SubsectionBase )
    return 1;
  Object = ControlArea->FilePointer.Object;
  v5 = MiIncrementSubsectionViewCount((_MSUBSECTION *)Subsection, Flags);
  if( v5 > 1 && Object && (ControlArea->u.LongFlags & 0x20) == 0 )
  {
    if( (Subsection->u.SubsectionFlags._bf_2 & 8) != 0 )
      MiRemoveUnusedSubsection((_MSUBSECTION *)Subsection);
    Subsection->u.SubsectionFlags._bf_0 |= 1u;
  }
  return v5;
}

Referenced by:

MiComputeDataFlushRange
MiFlushAcquire
MiPreventControlAreaDeletion
MiTrimSection
MiUpdateActiveSubsection