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:
Ingo Weinhold
2011-05-18 10:13:44 +00:00
parent e7812dd963
commit 222b8cf7b7
+4 -1
View File
@@ -780,7 +780,10 @@ cache_io(void* _cacheRef, void* cookie, off_t offset, addr_t buffer,
if (status != B_OK)
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);
continue;
}