Kernel/VFS: Don't rely on parent custodies being the same object

This assumption doesn't hold without the current Custody caching
mechanism.
This commit is contained in:
implicitfield
2025-05-16 02:02:57 +03:00
committed by Sönke Holz
parent e97d676879
commit 7cf3c76295

View File

@@ -134,7 +134,7 @@ bool VirtualFileSystem::check_matching_absolute_path_hierarchy(Custody const& fi
while (custody1->parent()) {
if (!custody2->parent())
return false;
if (custody1->parent().ptr() != custody2->parent().ptr())
if (&custody1->parent()->inode() != &custody2->parent()->inode())
return false;
custody1 = custody1->parent();
custody2 = custody2->parent();