open file descriptor references to vm files weren't properly initialised.

This fixes the issue. sys_read/write yet to be inspected.
This commit is contained in:
Bahadir Balban
2008-04-22 01:41:18 +01:00
parent e8bb529dcb
commit 1270cfe3b3

View File

@@ -94,10 +94,14 @@ int vfs_receive_sys_open(l4id_t sender, l4id_t opener, int fd,
return 0;
}
/* Initialise and add it to global list */
/* Initialise and add a reference to it from the task */
vm_file_to_vnum(vmfile) = vnum;
vmfile->length = length;
vmfile->vm_obj.pager = &file_pager;
t->fd[fd].vmfile = vmfile;
vmfile->vm_obj.refcnt++;
/* Add to global list */
list_add(&vmfile->vm_obj.list, &vm_file_list);
l4_ipc_return(0);