diff options
author | dzwdz | 2021-09-12 18:02:12 +0200 |
---|---|---|
committer | dzwdz | 2021-09-12 18:02:12 +0200 |
commit | badde3808a8a2ef512ae52af5d91f419585e27fd (patch) | |
tree | 4c5864717f75df4ac140c881b42c18dceb5352f3 /src/kernel/syscalls.c | |
parent | 3ea9657aaaf02709c8f216285b095af29e76491c (diff) |
allow vfs_request_finish to return
thanks to this, the fs provider can continue executing until the next
fs_wait() call. that should speed things up a bit
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r-- | src/kernel/syscalls.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index b247619..18ecd25 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -87,7 +87,7 @@ handle_t _syscall_open(const char __user *path, int len) { mount = vfs_mount_resolve(process_current->mount, path_buf, len); if (!mount) goto fail; - vfs_request_create((struct vfs_request) { + return vfs_request_create((struct vfs_request) { .type = VFSOP_OPEN, .input = { .kern = true, @@ -97,7 +97,6 @@ handle_t _syscall_open(const char __user *path, int len) { .caller = process_current, .backend = mount->backend, }); - // doesn't return / fallthrough to fail fail: kfree(path_buf); @@ -145,7 +144,7 @@ int _syscall_write(handle_t handle_num, const char __user *buf, int len) { struct handle *handle = &process_current->handles[handle_num]; if (handle_num < 0 || handle_num >= HANDLE_MAX) return -1; if (handle->type != HANDLE_FILE) return -1; - vfs_request_create((struct vfs_request) { + return vfs_request_create((struct vfs_request) { .type = VFSOP_WRITE, .input = { .buf = (userptr_t) buf, @@ -155,7 +154,6 @@ int _syscall_write(handle_t handle_num, const char __user *buf, int len) { .caller = process_current, .backend = handle->file.backend, }); - return -1; } int _syscall_close(handle_t handle) { |