Kernel: Remove unnecessary locking in RangeAllocator::contains()

The total range managed by a RangeAllocator doesn't change, so there's
no need to take a spinlock while comparing against it.
This commit is contained in:
Andreas Kling 2021-07-14 23:54:45 +02:00
parent d4c73daacb
commit 7ff14fecba
Notes: sideshowbarker 2024-07-18 08:59:51 +09:00

View file

@ -28,11 +28,7 @@ public:
void dump() const;
bool contains(Range const& range) const
{
ScopedSpinLock lock(m_lock);
return m_total_range.contains(range);
}
bool contains(Range const& range) const { return m_total_range.contains(range); }
private:
void carve_at_index(int, Range const&);