Kernel: Don't take MM lock in ~PageDirectory()

We don't need the MM lock to unregister a PageDirectory from the CR3
map. This is already protected by the CR3 map's own lock.
This commit is contained in:
Andreas Kling 2022-08-24 12:30:59 +02:00
parent 5beed613ca
commit ac3ea277aa
Notes: sideshowbarker 2024-07-17 17:40:13 +09:00

View file

@ -115,7 +115,6 @@ UNMAP_AFTER_INIT void PageDirectory::allocate_kernel_directory()
PageDirectory::~PageDirectory()
{
if (is_cr3_initialized()) {
SpinlockLocker lock(s_mm_lock);
deregister_page_directory(this);
}
}