Fixed race condition in the page writer: The state of the page we have
picked might have changed while we were locking its cache. Might fix #1931. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24430 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
9596a089a4
commit
8b76a59a0d
@ -965,6 +965,11 @@ page_writer(void* /*unused*/)
|
||||
}
|
||||
|
||||
InterruptsSpinLocker locker(sPageLock);
|
||||
|
||||
// state might have change while we were locking the cache
|
||||
if (page->state != PAGE_STATE_MODIFIED)
|
||||
continue;
|
||||
|
||||
remove_page_from_queue(&sModifiedPageQueue, page);
|
||||
page->state = PAGE_STATE_BUSY;
|
||||
page->busy_writing = true;
|
||||
|
Loading…
Reference in New Issue
Block a user