mirror of
https://github.com/drasko/codezero.git
synced 2026-01-16 21:03:16 +01:00
Fixed minor faults during close path.
FIXME: write/close/open/read sequence does not read the initially written data. Investigate.
This commit is contained in:
@@ -93,7 +93,8 @@ struct vnode *vfs_create(struct tcb *task, struct pathdata *pdata,
|
||||
return newnode;
|
||||
}
|
||||
|
||||
/* Pager notifies vfs about a closed file descriptor.
|
||||
/*
|
||||
* Pager notifies vfs about a closed file descriptor.
|
||||
*
|
||||
* FIXME: fsync + close could be done under a single "close" ipc
|
||||
* from pager. Currently there are 2 ipcs: 1 fsync + 1 fd close.
|
||||
@@ -103,9 +104,10 @@ int pager_sys_close(l4id_t sender, l4id_t closer, int fd)
|
||||
struct tcb *task;
|
||||
int err;
|
||||
|
||||
BUG_ON(!(task = find_task(sender)));
|
||||
BUG_ON(!(task = find_task(closer)));
|
||||
|
||||
if ((err = id_del(task->fdpool, task->fd[fd])) < 0) {
|
||||
printf("Deleting fd: %d\n", fd);
|
||||
if ((err = id_del(task->fdpool, fd)) < 0) {
|
||||
printf("%s: Error releasing fd identifier.\n",
|
||||
__FUNCTION__);
|
||||
l4_ipc_return(err);
|
||||
|
||||
Reference in New Issue
Block a user