summaryrefslogtreecommitdiff
path: root/src/kernel/vfs/request.c
diff options
context:
space:
mode:
authordzwdz2022-04-16 18:31:21 +0200
committerdzwdz2022-04-16 18:31:21 +0200
commite55ace0f517ede6f3635341c8adadc7b90aa75c5 (patch)
treeb86f83d32a35e8996854f0c0502365e07fef28bd /src/kernel/vfs/request.c
parent42e4b941b70499f5cf10f41126af1634821d72d5 (diff)
kernel/vfs: be more strict about the state of `vfs_backend.handler`
Diffstat (limited to 'src/kernel/vfs/request.c')
-rw-r--r--src/kernel/vfs/request.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/vfs/request.c b/src/kernel/vfs/request.c
index 277c353..ad72264 100644
--- a/src/kernel/vfs/request.c
+++ b/src/kernel/vfs/request.c
@@ -21,9 +21,8 @@ int vfs_request_create(struct vfs_request req_) {
case VFS_BACK_ROOT:
return vfs_root_handler(req);
case VFS_BACK_USER:
- if (req->backend->handler
- && req->backend->handler->state == PS_WAITS4REQUEST)
- {
+ if (req->backend->handler) {
+ assert(req->backend->handler->state == PS_WAITS4REQUEST);
vfs_request_accept(req);
} else {
// backend isn't ready yet, join the queue
@@ -65,6 +64,7 @@ int vfs_request_accept(struct vfs_request *req) {
process_transition(handler, PS_RUNNING);
handler->handled_req = req;
+ req->backend->handler = NULL;
regs_savereturn(&handler->regs, 0);
return 0;
fail: