Skip to content

Commit

Permalink
CR feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyastolfi committed Dec 4, 2024
1 parent 994b26c commit 0db0caa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/llfs/page_cache_slot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ auto PageCacheSlot::acquire_pin(PageId key, bool ignore_key) noexcept -> PinnedR

BATT_CHECK_EQ(new_state & Self::kOverflowMask, 0);

BATT_CHECK(this->is_pinned(new_state));
BATT_CHECK(Self::is_pinned(new_state));

BATT_SUPPRESS_IF_GCC("-Wmaybe-uninitialized")

Expand Down Expand Up @@ -199,7 +199,7 @@ void PageCacheSlot::release_pin() noexcept
<< BATT_INSPECT(old_state);

const auto new_state = old_state - kPinCountDelta;
const bool newly_unpinned = !this->is_pinned(new_state);
const bool newly_unpinned = !Self::is_pinned(new_state);

BATT_CHECK_EQ(new_state & Self::kOverflowMask, 0);

Expand Down Expand Up @@ -244,7 +244,7 @@ bool PageCacheSlot::evict_if_key_equals(PageId key) noexcept
const auto old_state = this->state_.fetch_add(kPinCountDelta, std::memory_order_acquire);
auto observed_state = old_state + kPinCountDelta;

const bool newly_pinned = !this->is_pinned(old_state);
const bool newly_pinned = !Self::is_pinned(old_state);
if (newly_pinned) {
this->add_ref();
}
Expand All @@ -257,7 +257,7 @@ bool PageCacheSlot::evict_if_key_equals(PageId key) noexcept
for (;;) {
// To succeed, we must be holding the only pin, the slot must be valid, and the key must match.
//
if (!(Self::get_pin_count(observed_state) == 1 && this->is_valid(observed_state) &&
if (!(Self::get_pin_count(observed_state) == 1 && Self::is_valid(observed_state) &&
this->key_ == key)) {
this->release_pin();
return false;
Expand Down

0 comments on commit 0db0caa

Please sign in to comment.