summaryrefslogtreecommitdiff
path: root/Kernel/FileSystem
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-11-24 16:14:24 +0100
committerAndreas Kling <kling@serenityos.org>2020-11-24 16:16:09 +0100
commit3e3a72f2a2a15ab70643ac816918c2083af717dd (patch)
tree8ca29eeaf2b950070e8b6614c981511b80f90d6f /Kernel/FileSystem
parenta6a3c20071ecd1f7ce26e9201e3be76d7a9ebccc (diff)
downloadserenity-3e3a72f2a2a15ab70643ac816918c2083af717dd.zip
Ext2FS: Oops, fix forgotten assignment in Ext2FSInode::resize()
If the inode's block list cache is empty, we forgot to assign the result of computing the block list. The fact that this worked anyway makes me wonder when we actually don't have a cache.. Thanks to szyszkienty for spotting this! :^)
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r--Kernel/FileSystem/Ext2FileSystem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/FileSystem/Ext2FileSystem.cpp b/Kernel/FileSystem/Ext2FileSystem.cpp
index 8de53f4f64..3ecbd951e1 100644
--- a/Kernel/FileSystem/Ext2FileSystem.cpp
+++ b/Kernel/FileSystem/Ext2FileSystem.cpp
@@ -776,7 +776,7 @@ KResult Ext2FSInode::resize(u64 new_size)
if (!m_block_list.is_empty())
block_list = m_block_list;
else
- fs().block_list_for_inode(m_raw_inode);
+ block_list = fs().block_list_for_inode(m_raw_inode);
if (blocks_needed_after > blocks_needed_before) {
auto new_blocks = fs().allocate_blocks(fs().group_index_from_inode(index()), blocks_needed_after - blocks_needed_before);