summaryrefslogtreecommitdiff
path: root/kernel/fs/ext2.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/fs/ext2.c')
-rw-r--r--kernel/fs/ext2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/fs/ext2.c b/kernel/fs/ext2.c
index 167c2aa..e815e79 100644
--- a/kernel/fs/ext2.c
+++ b/kernel/fs/ext2.c
@@ -806,8 +806,10 @@ vfs_inode_t *ext2_mount(void) {
cache = kcalloc(3000, sizeof(struct BLOCK_CACHE));
// TODO: Can this be done better? Maybe create a seperate function in
// the VFS?
- mount_fd = current_task->file_descriptors[fd];
- current_task->file_descriptors[fd] = NULL;
+ 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);
parse_superblock();
return vfs_create_inode(
0 /*inode_num*/, 0 /*type*/, 0 /*has_data*/, 0 /*can_write*/,