cache_io(): Since satisfy_cache_io() (respectively the function it calls)
unlocks the cache, we have to look up the page again, since someone else could have removed it in the meantime. Possibly fixes #7514. +r1alpha3 git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41564 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+4
-1
@@ -780,7 +780,10 @@ cache_io(void* _cacheRef, void* cookie, off_t offset, addr_t buffer,
|
|||||||
if (status != B_OK)
|
if (status != B_OK)
|
||||||
return status;
|
return status;
|
||||||
|
|
||||||
if (page->busy) {
|
// Since satisfy_cache_io() unlocks the cache, we need to look up
|
||||||
|
// the page again.
|
||||||
|
page = cache->LookupPage(offset);
|
||||||
|
if (page != NULL && page->busy) {
|
||||||
cache->WaitForPageEvents(page, PAGE_EVENT_NOT_BUSY, true);
|
cache->WaitForPageEvents(page, PAGE_EVENT_NOT_BUSY, true);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user