* The parent of an IOOperation cannot be NULL for completed operations.
* This fixes CID 1507. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38458 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2008-2010, Ingo Weinhold, [email protected].
|
* Copyright 2008-2010, Ingo Weinhold, [email protected].
|
||||||
* Copyright 2004-2009, Axel Dörfler, [email protected].
|
* Copyright 2004-2010, Axel Dörfler, [email protected].
|
||||||
* Distributed under the terms of the MIT License.
|
* Distributed under the terms of the MIT License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -353,15 +353,14 @@ IOSchedulerSimple::_Finisher()
|
|||||||
|
|
||||||
// notify request and remove operation
|
// notify request and remove operation
|
||||||
IORequest* request = operation->Parent();
|
IORequest* request = operation->Parent();
|
||||||
if (request != NULL) {
|
|
||||||
generic_size_t operationOffset = operation->OriginalOffset()
|
generic_size_t operationOffset
|
||||||
- request->Offset();
|
= operation->OriginalOffset() - request->Offset();
|
||||||
request->OperationFinished(operation, operation->Status(),
|
request->OperationFinished(operation, operation->Status(),
|
||||||
operation->TransferredBytes() < operation->OriginalLength(),
|
operation->TransferredBytes() < operation->OriginalLength(),
|
||||||
operation->Status() == B_OK
|
operation->Status() == B_OK
|
||||||
? operationOffset + operation->OriginalLength()
|
? operationOffset + operation->OriginalLength()
|
||||||
: operationOffset);
|
: operationOffset);
|
||||||
}
|
|
||||||
|
|
||||||
// recycle the operation
|
// recycle the operation
|
||||||
MutexLocker _(fLock);
|
MutexLocker _(fLock);
|
||||||
|
|||||||
Reference in New Issue
Block a user