From db68d60fa72ff4b35bff9ca5191d4615fc142b34 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 27 Sep 2009 11:46:17 +0800 Subject: [PATCH] Fixed MM_PageFault duplicating a page when it is only used once --- Kernel/arch/x86/mm_virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/arch/x86/mm_virt.c b/Kernel/arch/x86/mm_virt.c index 2e726ccf..b2520b52 100644 --- a/Kernel/arch/x86/mm_virt.c +++ b/Kernel/arch/x86/mm_virt.c @@ -105,7 +105,7 @@ void MM_PageFault(Uint Addr, Uint ErrorCode, tRegs *Regs) && gaPageTable[Addr>>12] & PF_COW ) { tPAddr paddr; - if(MM_GetRefCount( gaPageTable[Addr>>12] & ~0xFFF ) == 0) + if(MM_GetRefCount( gaPageTable[Addr>>12] & ~0xFFF ) == 1) { gaPageTable[Addr>>12] &= ~PF_COW; gaPageTable[Addr>>12] |= PF_PRESENT|PF_WRITE; -- 2.20.1