From d96e0b80cfa0e6ef962018b712e49391b6a2eb2a Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Thu, 24 Nov 2011 11:22:18 +0000 Subject: [PATCH] [NTOSKRNL] * Timo Kreuzer: Fix some dead code. CID 14595. svn path=/trunk/; revision=54486 --- reactos/ntoskrnl/mm/i386/page.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/reactos/ntoskrnl/mm/i386/page.c b/reactos/ntoskrnl/mm/i386/page.c index 1704cfb9441..978519ebe95 100644 --- a/reactos/ntoskrnl/mm/i386/page.c +++ b/reactos/ntoskrnl/mm/i386/page.c @@ -213,7 +213,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) { /* We should have a process for user land addresses */ ASSERT(Process != NULL); - + if(Process != PsGetCurrentProcess()) { PageDir = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase[0])); @@ -229,8 +229,9 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) return NULL; } MI_SET_USAGE(MI_USAGE_LEGACY_PAGE_DIRECTORY); - if (Process) MI_SET_PROCESS2(Process->ImageFileName); - if (!Process) MI_SET_PROCESS2("Kernel Legacy"); + + MI_SET_PROCESS2(Process->ImageFileName); + Status = MmRequestPageMemoryConsumer(MC_SYSTEM, FALSE, &Pfn); if (!NT_SUCCESS(Status) || Pfn == 0) { @@ -264,8 +265,8 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create) return NULL; } MI_SET_USAGE(MI_USAGE_LEGACY_PAGE_DIRECTORY); - if (Process) MI_SET_PROCESS2(Process->ImageFileName); - if (!Process) MI_SET_PROCESS2("Kernel Legacy"); + MI_SET_PROCESS2(Process->ImageFileName); + Status = MmRequestPageMemoryConsumer(MC_SYSTEM, FALSE, &Pfn); if (!NT_SUCCESS(Status) || Pfn == 0) {