* The page writer was calling remove_page_marker() without holding the

sPageLock. This could easily mess up the page queue.
* Now, remove_page_marker() gets the lock itself. This fixes bug #1900.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25250 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2008-04-29 16:48:27 +00:00
parent 8e8edffce7
commit 0b51ee4efd

View File

@ -891,6 +891,7 @@ remove_page_marker(struct vm_page &marker)
if (marker.state == PAGE_STATE_UNUSED)
return;
InterruptsSpinLocker locker(sPageLock);
page_queue *queue;
vm_page *page;
@ -1249,9 +1250,10 @@ steal_pages(vm_page **pages, size_t count, bool reserve)
tried = true;
}
InterruptsSpinLocker locker(sPageLock);
remove_page_marker(marker);
InterruptsSpinLocker locker(sPageLock);
if (reserve && sReservedPages <= free_page_queue_count()
|| count == 0
|| !reserve && (sInactivePageQueue.count > 0