Ticket #7514: cache_io-re-lookup-after-satisfy_cache_io.diff

File cache_io-re-lookup-after-satisfy_cache_io.diff, 575 bytes (added by bonefish, 13 years ago)

patch: cache_io(): look up the page again after satisfy_cache_io()

  • src/system/kernel/cache/file_cache.cpp

     
    780780            if (status != B_OK)
    781781                return status;
    782782
    783             if (page->busy) {
     783            // Since satisfy_cache_io() unlocks the cache, we need to look up
     784            // the page again.
     785            page = cache->LookupPage(offset);
     786            if (page != NULL && page->busy) {
    784787                cache->WaitForPageEvents(page, PAGE_EVENT_NOT_BUSY, true);
    785788                continue;
    786789            }