Commit 7e67b2f9 authored by Zardosht Kasheff's avatar Zardosht Kasheff Committed by Yoni Fogel

refs #5421, fix a race condition in accessing p->attr.

git-svn-id: file:///svn/toku/tokudb@47308 c7de825b-a66e-492c-adef-691d508d4ae1
parent 3894c466
...@@ -1901,9 +1901,9 @@ cachetable_unpin_internal( ...@@ -1901,9 +1901,9 @@ cachetable_unpin_internal(
CACHETABLE ct = cachefile->cachetable; CACHETABLE ct = cachefile->cachetable;
bool added_data_to_cachetable = false; bool added_data_to_cachetable = false;
pair_lock(p);
PAIR_ATTR old_attr = p->attr; PAIR_ATTR old_attr = p->attr;
PAIR_ATTR new_attr = attr; PAIR_ATTR new_attr = attr;
pair_lock(p);
if (dirty) { if (dirty) {
p->dirty = CACHETABLE_DIRTY; p->dirty = CACHETABLE_DIRTY;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment