From 45b309e39d7a6a3c58eb2575c3f1fb4bc6866456 Mon Sep 17 00:00:00 2001 From: Michael Lotz Date: Fri, 4 Jul 2008 14:41:17 +0000 Subject: [PATCH] Spotted this while reading through page code. The usage_count would be set for wrong pages when allocating a page run unless the run started at page 0 as the start offset was missing. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26245 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/vm/vm_page.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system/kernel/vm/vm_page.cpp b/src/system/kernel/vm/vm_page.cpp index 60487e52a7..f041f94ad0 100644 --- a/src/system/kernel/vm/vm_page.cpp +++ b/src/system/kernel/vm/vm_page.cpp @@ -1799,7 +1799,7 @@ vm_page_allocate_page_run(int pageState, addr_t length) sPages[start + i].is_cleared = sPages[start + i].state == PAGE_STATE_CLEAR; set_page_state_nolock(&sPages[start + i], PAGE_STATE_BUSY); - sPages[i].usage_count = 2; + sPages[start + i].usage_count = 2; } firstPage = &sPages[start]; break;