diff --git a/fs/vfs/ramfs.c b/fs/vfs/ramfs.c index 7b19406..6958c80 100644 --- a/fs/vfs/ramfs.c +++ b/fs/vfs/ramfs.c @@ -146,6 +146,7 @@ static int link(dirent_t *in, inode_t *to, const char *name, dirent_t **out) return -ENOMEM; } + inode_inc_ref(to); new->inode = to; new->fs_ptr = in->fs_ptr;