mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
Kernel: Fix oversized InodeVMObject after inode size changes
This commit is contained in:
parent
9bd68b189e
commit
b018cd653f
Notes:
sideshowbarker
2024-07-19 12:33:22 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/b018cd653fe
@ -43,7 +43,7 @@ void InodeVMObject::inode_size_changed(Badge<Inode>, size_t old_size, size_t new
|
|||||||
|
|
||||||
InterruptDisabler disabler;
|
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);
|
m_physical_pages.resize(new_page_count);
|
||||||
|
|
||||||
// FIXME: Consolidate with inode_contents_changed() so we only do a single walk.
|
// FIXME: Consolidate with inode_contents_changed() so we only do a single walk.
|
||||||
|
Loading…
Reference in New Issue
Block a user