packagefs: PackageFile::DataAccessor: Avoid unnecessary locking
... in case of version 2 package files.
This commit is contained in:
parent
d59e0feb59
commit
b814feabd7
@ -105,7 +105,8 @@ struct PackageFile::DataAccessor {
|
||||
|
||||
if (toRead > 0) {
|
||||
IORequestOutput output(request);
|
||||
MutexLocker locker(fLock);
|
||||
MutexLocker locker(fLock, false, fData->Version() == 1);
|
||||
// V2 readers are reentrant
|
||||
status_t error = fReader->ReadDataToOutput(offset, toRead, &output);
|
||||
if (error != B_OK)
|
||||
RETURN_ERROR(error);
|
||||
|
Loading…
x
Reference in New Issue
Block a user