packagefs: Just set cache->virtual_end rather than using Resize().
Resize() has extra logic to deal with shrinking the cache and adding commitments, neither of which we need here.
This commit is contained in:
@@ -113,12 +113,7 @@ CachedDataReader::Init(BAbstractBufferedDataReader* reader, off_t size)
|
|||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
RETURN_ERROR(error);
|
RETURN_ERROR(error);
|
||||||
|
|
||||||
AutoLocker<VMCache> locker(fCache);
|
fCache->virtual_end = size;
|
||||||
|
|
||||||
error = fCache->Resize(size, VM_PRIORITY_SYSTEM);
|
|
||||||
if (error != B_OK)
|
|
||||||
RETURN_ERROR(error);
|
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user