ramfs: write: update file size when size increased
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
5da009c1a2
commit
3ca769014c
1 changed files with 1 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue