diff options
author | dzwdz | 2023-01-06 20:45:30 +0100 |
---|---|---|
committer | dzwdz | 2023-01-06 20:45:30 +0100 |
commit | e0c7bad47a54d865ef6194643e2cd20f6094e507 (patch) | |
tree | a9c731aecaad9c08ff4e732ae5dc8941a60cddd4 /src/kernel/syscalls.c | |
parent | aedefd551da5e50f89eeaf74a7d6e1a76760ec7b (diff) |
kernel: turn the NULLFS into an always present special handle
preparing for HANDLE_PROCFS
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r-- | src/kernel/syscalls.c | 12 |
1 files changed, 5 insertions, 7 deletions
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 |