Also fix one locking issue that helgrind found: Maintain stats->lock
while stats->reference is used.
(cherry picked from commit 10dd5f62f2)
Also fix one locking issue that helgrind found: Maintain stats->lock
while stats->reference is used.
(cherry picked from commit 10dd5f62f2)