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:
Augustin Cavalier
2024-10-02 15:40:32 -04:00
parent 502591624e
commit c2aac52c17
@@ -113,12 +113,7 @@ CachedDataReader::Init(BAbstractBufferedDataReader* reader, off_t size)
if (error != B_OK)
RETURN_ERROR(error);
AutoLocker<VMCache> locker(fCache);
error = fCache->Resize(size, VM_PRIORITY_SYSTEM);
if (error != B_OK)
RETURN_ERROR(error);
fCache->virtual_end = size;
return B_OK;
}