Add missing MutexLock to MockEnv::CreateDir (#6474)

Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/6474

Differential Revision: D20205109

Pulled By: ltamasi

fbshipit-source-id: ec136005c63740f5b713ff537b5671ea9b8e217a
This commit is contained in:
sumeerbhola 2020-03-02 20:49:27 -08:00 committed by Facebook Github Bot
parent 17bef7d3a8
commit 48d8d076a3

1
env/mock_env.cc vendored
View File

@ -587,6 +587,7 @@ Status MockEnv::Truncate(const std::string& fname, size_t size) {
Status MockEnv::CreateDir(const std::string& dirname) {
auto dn = NormalizePath(dirname);
MutexLock lock(&mutex_);
if (file_map_.find(dn) == file_map_.end()) {
MemFile* file = new MemFile(this, dn, false);
file->Ref();