diff options
Diffstat (limited to 'src/kernel/syscalls.c')
-rw-r--r-- | src/kernel/syscalls.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/kernel/syscalls.c b/src/kernel/syscalls.c index 57286f1..7748bc5 100644 --- a/src/kernel/syscalls.c +++ b/src/kernel/syscalls.c @@ -109,12 +109,17 @@ int _syscall_mount(handle_t hid, const char __user *path, int len) { } // otherwise backend == NULL // append to mount list + // TODO move to kernel/vfs/mount.c mount = kmalloc(sizeof *mount); mount->prev = process_current->mount; - mount->prefix = path_buf; + mount->prefix = path_buf; // owned mount->prefix_len = len; mount->backend = backend; + mount->refs = 1; process_current->mount = mount; + + kmalloc_sanity(mount); + kmalloc_sanity(mount->prefix); return 0; fail: |