osdc: should release the rwlock before waiting

this addresses a regresssion introduced by 20b1ac6e

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2019-08-15 19:33:15 +08:00
parent e1bbc4e16d
commit 1b8df73697

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