diff --git a/fs/vfs/ramfs.c b/fs/vfs/ramfs.c index 6958c80..ce0635e 100644 --- a/fs/vfs/ramfs.c +++ b/fs/vfs/ramfs.c @@ -123,6 +123,7 @@ static ssize_t write(inode_t *inode, char *buf, size_t size, size_t offset) if (inode->file_size < size + offset) { inode->data = krealloc(inode->data, size + offset, ALLOC_KERN); + inode->file_size = size + offset; if (!inode->data) { ret = -ENOMEM; goto out;