Missing locking when adding/removing package nodes

This commit is contained in:
Ingo Weinhold 2011-06-25 01:59:46 +02:00
parent 83d5997db5
commit 35eeebddc4

View File

@ -1029,6 +1029,7 @@ Volume::_AddPackageNode(Directory* directory, PackageNode* packageNode,
}
BReference<Node> nodeReference(node);
NodeWriteLocker nodeWriteLocker(node);
status_t error = unpackingNode->AddPackageNode(packageNode);
if (error != B_OK) {
@ -1075,6 +1076,7 @@ Volume::_RemovePackageNode(Directory* directory, PackageNode* packageNode,
return;
BReference<Node> nodeReference(node);
NodeWriteLocker nodeWriteLocker(node);
PackageNode* headPackageNode = unpackingNode->GetPackageNode();
unpackingNode->RemovePackageNode(packageNode);