From 3ca769014c69cd878ff3b4267ead729717772c89 Mon Sep 17 00:00:00 2001 From: Michael Shaw Date: Sun, 5 Jul 2026 14:16:02 +0200 Subject: [PATCH] ramfs: write: update file size when size increased Signed-off-by: Michael Shaw --- fs/vfs/ramfs.c | 1 + 1 file changed, 1 insertion(+) 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;