mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[NTOS:MM] MiSetPagingOfDriver(): Add an explicit #if around unreachable code
This commit is contained in:
parent
869a914cfd
commit
710acab83d
1 changed files with 6 additions and 4 deletions
|
@ -2436,8 +2436,6 @@ MiSetSystemCodeProtection(
|
|||
|
||||
/* Flush it all */
|
||||
KeFlushEntireTb(TRUE, TRUE);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
VOID
|
||||
|
@ -2562,17 +2560,20 @@ NTAPI
|
|||
MiSetPagingOfDriver(IN PMMPTE PointerPte,
|
||||
IN PMMPTE LastPte)
|
||||
{
|
||||
#ifdef ENABLE_MISETPAGINGOFDRIVER
|
||||
PVOID ImageBase;
|
||||
PETHREAD CurrentThread = PsGetCurrentThread();
|
||||
PFN_COUNT PageCount = 0;
|
||||
PFN_NUMBER PageFrameIndex;
|
||||
PMMPFN Pfn1;
|
||||
#endif // ENABLE_MISETPAGINGOFDRIVER
|
||||
|
||||
PAGED_CODE();
|
||||
|
||||
#ifndef ENABLE_MISETPAGINGOFDRIVER
|
||||
/* The page fault handler is broken and doesn't page back in! */
|
||||
DPRINT1("WARNING: MiSetPagingOfDriver() called, but paging is broken! ignoring!\n");
|
||||
return;
|
||||
|
||||
#else // ENABLE_MISETPAGINGOFDRIVER
|
||||
/* Get the driver's base address */
|
||||
ImageBase = MiPteToAddress(PointerPte);
|
||||
ASSERT(MI_IS_SESSION_IMAGE_ADDRESS(ImageBase) == FALSE);
|
||||
|
@ -2610,6 +2611,7 @@ MiSetPagingOfDriver(IN PMMPTE PointerPte,
|
|||
/* Update counters */
|
||||
InterlockedExchangeAdd((PLONG)&MmTotalSystemDriverPages, PageCount);
|
||||
}
|
||||
#endif // ENABLE_MISETPAGINGOFDRIVER
|
||||
}
|
||||
|
||||
VOID
|
||||
|
|
Loading…
Reference in a new issue