summaryrefslogtreecommitdiff
path: root/kernel/fs/ext2.c
diff options
context:
space:
mode:
authorAnton Kling <anton@kling.gg>2024-04-27 15:26:39 +0200
committerAnton Kling <anton@kling.gg>2024-04-27 15:26:39 +0200
commit02c27583a539c4e8073509536d328581cf1ba346 (patch)
tree67c8de59e04b118116f039e724be3ee9268b507f /kernel/fs/ext2.c
parent7ab3153f92f38223157c4c1f4af1c30e33c94a76 (diff)
Kernel: Make file descriptor numbers reusable.
Instead of using the "append only" list it now uses "relist" which allows for indexes to be removed.
Diffstat (limited to 'kernel/fs/ext2.c')
-rw-r--r--kernel/fs/ext2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/fs/ext2.c b/kernel/fs/ext2.c
index db947c0..613cf53 100644
--- a/kernel/fs/ext2.c
+++ b/kernel/fs/ext2.c
@@ -814,7 +814,7 @@ vfs_inode_t *ext2_mount(void) {
mount_fd = get_vfs_fd(fd, NULL);
// Remove the FD from the current task
// FIXME: This is a hacky solution
- list_set(&current_task->file_descriptors, fd, NULL);
+ relist_remove(&current_task->file_descriptors, fd);
parse_superblock();
return vfs_create_inode(
0 /*inode_num*/, 0 /*type*/, 0 /*has_data*/, 0 /*can_write*/,