File tree Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Expand file tree Collapse file tree 3 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -341,10 +341,9 @@ void AddressSpace::remove_all_regions(Badge<Process>)
341
341
VERIFY (Thread::current () == g_finalizer);
342
342
{
343
343
SpinlockLocker pd_locker (m_page_directory->get_lock ());
344
- SpinlockLocker mm_locker (s_mm_lock);
345
344
m_region_tree.with ([&](auto & region_tree) {
346
345
for (auto & region : region_tree.regions ())
347
- region.unmap_with_locks_held (ShouldFlushTLB::No, pd_locker, mm_locker );
346
+ region.unmap_with_locks_held (ShouldFlushTLB::No, pd_locker);
348
347
});
349
348
}
350
349
Original file line number Diff line number Diff line change @@ -70,8 +70,7 @@ Region::~Region()
70
70
if (!is_readable () && !is_writable () && !is_executable ()) {
71
71
// If the region is "PROT_NONE", we didn't map it in the first place.
72
72
} else {
73
- SpinlockLocker mm_locker (s_mm_lock);
74
- unmap_with_locks_held (ShouldFlushTLB::Yes, pd_locker, mm_locker);
73
+ unmap_with_locks_held (ShouldFlushTLB::Yes, pd_locker);
75
74
VERIFY (!m_page_directory);
76
75
}
77
76
}
@@ -268,11 +267,10 @@ void Region::unmap(ShouldFlushTLB should_flush_tlb)
268
267
if (!m_page_directory)
269
268
return ;
270
269
SpinlockLocker pd_locker (m_page_directory->get_lock ());
271
- SpinlockLocker mm_locker (s_mm_lock);
272
- unmap_with_locks_held (should_flush_tlb, pd_locker, mm_locker);
270
+ unmap_with_locks_held (should_flush_tlb, pd_locker);
273
271
}
274
272
275
- void Region::unmap_with_locks_held (ShouldFlushTLB should_flush_tlb, SpinlockLocker<RecursiveSpinlock>&, SpinlockLocker<RecursiveSpinlock>& )
273
+ void Region::unmap_with_locks_held (ShouldFlushTLB should_flush_tlb, SpinlockLocker<RecursiveSpinlock>&)
276
274
{
277
275
if (!m_page_directory)
278
276
return ;
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ class Region final
183
183
void set_page_directory (PageDirectory&);
184
184
ErrorOr<void > map (PageDirectory&, ShouldFlushTLB = ShouldFlushTLB::Yes);
185
185
void unmap (ShouldFlushTLB = ShouldFlushTLB::Yes);
186
- void unmap_with_locks_held (ShouldFlushTLB, SpinlockLocker<RecursiveSpinlock>& pd_locker, SpinlockLocker<RecursiveSpinlock>& mm_locker );
186
+ void unmap_with_locks_held (ShouldFlushTLB, SpinlockLocker<RecursiveSpinlock>& pd_locker);
187
187
188
188
void remap ();
189
189
You can’t perform that action at this time.
0 commit comments