mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-22 23:55:12 +00:00
Kernel: Teach Region how to remap itself
Now remapping (i.e flushing kernel metadata to the CPU page tables) is done by simply calling Region::remap().
This commit is contained in:
@@ -47,9 +47,8 @@ void InodeVMObject::inode_size_changed(Badge<Inode>, size_t old_size, size_t new
|
||||
m_physical_pages.resize(new_page_count);
|
||||
|
||||
// FIXME: Consolidate with inode_contents_changed() so we only do a single walk.
|
||||
for_each_region([](Region& region) {
|
||||
ASSERT(region.page_directory());
|
||||
MM.remap_region(*region.page_directory(), region);
|
||||
for_each_region([](auto& region) {
|
||||
region.remap();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -99,9 +98,8 @@ void InodeVMObject::inode_contents_changed(Badge<Inode>, off_t offset, ssize_t s
|
||||
#endif
|
||||
|
||||
// FIXME: Consolidate with inode_size_changed() so we only do a single walk.
|
||||
for_each_region([](Region& region) {
|
||||
ASSERT(region.page_directory());
|
||||
MM.remap_region(*region.page_directory(), region);
|
||||
for_each_region([](auto& region) {
|
||||
region.remap();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user