MiMakePartitionActive

NTSTATUS __stdcall MiMakePartitionActive(_MI_PARTITION *Partition){
  struct _KLOCK_QUEUE_HANDLE LockHandle; 
  memset(&LockHandle, 0, sizeof(LockHandle));
  KeAcquireInStackQueuedSpinLock(&qword_140C4E340, &LockHandle);
  if( (*((_DWORD *)Partition + 1) & 0x20) == 0 )
  {
    KeReleaseInStackQueuedSpinLockFromDpcLevel(&LockHandle);
    __writecr8(LockHandle.OldIrql);
    return 1;
  }
  if( (unsigned int)MiChargeCommit(Partition, 0xA0ui64, 0i64) )
  {
    *((_DWORD *)Partition + 1) &= ~0x20u;
    *((_QWORD *)Partition + 782) = 160i64;
    KeReleaseInStackQueuedSpinLockFromDpcLevel(&LockHandle);
    __writecr8(LockHandle.OldIrql);
    MiReturnCommit(Partition, 0xA0ui64);
    if( Partition != (_MI_PARTITION *)&MiSystemPartition )
      MiSetSlabAllocatorPolicy((INT64)Partition);
    return 1;
  }
  KeReleaseInStackQueuedSpinLockFromDpcLevel(&LockHandle);
  __writecr8(LockHandle.OldIrql);
  return 0;
}

Referenced by:

MiEnablePartitionMappedWrites
MiInsertPageFileInList
MmCreateProcessAddressSpace