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

git-svn-id: file:///svn/toku/tokudb@47308 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Zardosht Kasheff 2013-04-17 00:01:05 -04:00 committed by Yoni Fogel
parent cca3b63cab
commit 000ecba786

View file

@ -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;
}