summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-08-24 19:33:51 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-08-24 19:35:47 +0200
commitb018cd653fe18fb73a4518d7d28c4cf7614e4c85 (patch)
treefd5928e1654c3c8a296f70d45ec83d120a4977d5 /Kernel
parent9bd68b189ee72564b20f501d0dc9d3c904c035fa (diff)
downloadserenity-b018cd653fe18fb73a4518d7d28c4cf7614e4c85.zip
Kernel: Fix oversized InodeVMObject after inode size changes
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/VM/InodeVMObject.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/VM/InodeVMObject.cpp b/Kernel/VM/InodeVMObject.cpp
index 595e70ad9a..b3c5579401 100644
--- a/Kernel/VM/InodeVMObject.cpp
+++ b/Kernel/VM/InodeVMObject.cpp
@@ -43,7 +43,7 @@ void InodeVMObject::inode_size_changed(Badge<Inode>, size_t old_size, size_t new
InterruptDisabler disabler;
- auto new_page_count = PAGE_ROUND_UP(new_size);
+ auto new_page_count = PAGE_ROUND_UP(new_size) / PAGE_SIZE;
m_physical_pages.resize(new_page_count);
// FIXME: Consolidate with inode_contents_changed() so we only do a single walk.