summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/request.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/vfs/request.c')
-rw-r--r--src/kernel/vfs/request.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/kernel/vfs/request.c b/src/kernel/vfs/request.c
index 0a377d3..a129f2e 100644
--- a/src/kernel/vfs/request.c
+++ b/src/kernel/vfs/request.c
@@ -64,6 +64,7 @@ void vfsreq_finish(struct vfs_request *req, char __user *stored, long ret,
// TODO write tests for caller getting killed while opening a file
if (!req->caller) panic_unimplemented();
ret = process_handle_put(req->caller, h);
+ if (ret < 0) ret = -EMFILE;
} else {
ret = -1;
}