From e0c7bad47a54d865ef6194643e2cd20f6094e507 Mon Sep 17 00:00:00 2001 From: dzwdz Date: Fri, 6 Jan 2023 20:45:30 +0100 Subject: kernel: turn the NULLFS into an always present special handle preparing for HANDLE_PROCFS --- src/kernel/syscalls.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src/kernel/syscalls.c') diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index 88e98c6..2ace0f4 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -145,13 +145,11 @@ long _syscall_mount(handle_t hid, const char __user *path, long len) { len--; } - if (hid >= 0) { // mounting a real backend? - struct handle *handle = process_handle_get(process_current, hid); - if (!handle || handle->type != HANDLE_FS_FRONT) - goto fail; - backend = handle->backend; - backend->refcount++; - } // otherwise backend == NULL + struct handle *handle = process_handle_get(process_current, hid); + if (!handle || handle->type != HANDLE_FS_FRONT) + goto fail; + backend = handle->backend; + if (backend) backend->refcount++; // append to mount list // TODO move to kernel/vfs/mount.c -- cgit v1.2.3