mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 15:28:58 +01:00
packagefs: Followups to the directory locking change.
* Fix the build with DEBUG enabled. * Add some more read-locks, to be safe.
This commit is contained in:
parent
38946ff82f
commit
04c9b279cb
@ -77,7 +77,7 @@ Index::Dump()
|
||||
if (GetIterator(it)) {
|
||||
while (Node* node = it.Next()) {
|
||||
PRINT(" node: `%s', dir: %" B_PRIdINO "\n",
|
||||
node->Name().Data(), node->Parent()->ID());
|
||||
node->Name().Data(), node->GetParentUnchecked()->ID());
|
||||
}
|
||||
}
|
||||
)
|
||||
|
@ -148,7 +148,7 @@ packagefs_lookup(fs_volume* fsVolume, fs_vnode* fsDir, const char* entryName,
|
||||
Node* node = (Node*)fsDir->private_node;
|
||||
|
||||
FUNCTION("volume: %p, dir: %p (%" B_PRId64 "), entry: \"%s\"\n", volume,
|
||||
dir, dir->ID(), entryName);
|
||||
node, node->ID(), entryName);
|
||||
|
||||
if (!S_ISDIR(node->Mode()))
|
||||
return B_NOT_A_DIRECTORY;
|
||||
|
@ -1923,6 +1923,7 @@ Volume::_AddPackageLinksNode(Node* node)
|
||||
// If this is a directory, recursively add descendants. The directory tree
|
||||
// for the package links isn't deep, so we can do recursion.
|
||||
if (Directory* directory = dynamic_cast<Directory*>(node)) {
|
||||
DirectoryReadLocker directoryReadLocker(directory);
|
||||
for (Node* child = directory->FirstChild(); child != NULL;
|
||||
child = directory->NextChild(child)) {
|
||||
_AddPackageLinksNode(child);
|
||||
@ -1937,6 +1938,7 @@ Volume::_RemovePackageLinksNode(Node* node)
|
||||
// If this is a directory, recursively remove descendants. The directory
|
||||
// tree for the package links isn't deep, so we can do recursion.
|
||||
if (Directory* directory = dynamic_cast<Directory*>(node)) {
|
||||
DirectoryReadLocker directoryReadLocker(directory);
|
||||
for (Node* child = directory->FirstChild(); child != NULL;
|
||||
child = directory->NextChild(child)) {
|
||||
_RemovePackageLinksNode(child);
|
||||
|
Loading…
Reference in New Issue
Block a user