Merge pull request #29686 from tchaikov/wip-osdc-wait-for-osdmap

osdc: should release the rwlock before waiting

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
Kefu Chai 2019-08-16 00:10:25 +08:00 committed by GitHub
commit 441ed26c9b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1925,6 +1925,7 @@ void Objecter::wait_for_osd_map()
std::unique_lock mlock{lock};
C_SafeCond *context = new C_SafeCond(lock, cond, &done, NULL);
waiting_for_map[0].push_back(pair<Context*, int>(context, 0));
l.unlock();
cond.wait(mlock, [&done] { return done; });
}