Changeset 24430

Show
Ignore:
Timestamp:
03/17/08 21:39:04 (2 months ago)
Author:
bonefish
Message:
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.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • haiku/trunk/src/system/kernel/vm/vm_page.cpp

    r23906 r24430  
    966966 
    967967                        InterruptsSpinLocker locker(sPageLock); 
     968 
     969                        // state might have change while we were locking the cache 
     970                        if (page->state != PAGE_STATE_MODIFIED) 
     971                                continue; 
     972 
    968973                        remove_page_from_queue(&sModifiedPageQueue, page); 
    969974                        page->state = PAGE_STATE_BUSY;