Fix vfs_procgroup_cleanup not handling hash collisions

This commit is contained in:
2026-02-21 22:38:50 +01:00
parent 02e77b5c90
commit 38d807f941

View File

@@ -168,6 +168,8 @@ void vfs_procgroup_cleanup (struct procgroup* procgroup) {
for (size_t i = 0; i < lengthof (mount_table.mountpoint_buckets); i++) { for (size_t i = 0; i < lengthof (mount_table.mountpoint_buckets); i++) {
struct hash_node_link* link = mount_table.mountpoint_buckets[i]; struct hash_node_link* link = mount_table.mountpoint_buckets[i];
while (link != NULL) {
struct vfs_mountpoint* vmp = hash_entry (link, struct vfs_mountpoint, mount_table_link); struct vfs_mountpoint* vmp = hash_entry (link, struct vfs_mountpoint, mount_table_link);
spin_lock (&vmp->lock); spin_lock (&vmp->lock);
@@ -178,6 +180,9 @@ void vfs_procgroup_cleanup (struct procgroup* procgroup) {
} }
spin_unlock (&vmp->lock); spin_unlock (&vmp->lock);
link = link->next;
}
} }
spin_unlock (&mount_table.lock); spin_unlock (&mount_table.lock);