diff options
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 |