diff --git a/ft/cachetable.cc b/ft/cachetable.cc index 84b513a639a..7c2af585c92 100644 --- a/ft/cachetable.cc +++ b/ft/cachetable.cc @@ -1901,9 +1901,9 @@ cachetable_unpin_internal( CACHETABLE ct = cachefile->cachetable; bool added_data_to_cachetable = false; + pair_lock(p); PAIR_ATTR old_attr = p->attr; PAIR_ATTR new_attr = attr; - pair_lock(p); if (dirty) { p->dirty = CACHETABLE_DIRTY; }