Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

os/memstore: Fix wrong use of lock_guard #20914

Merged
merged 1 commit into from Mar 16, 2018
Merged

os/memstore: Fix wrong use of lock_guard #20914

merged 1 commit into from Mar 16, 2018

Conversation

ibmibmibm
Copy link
Contributor

std::lock_guard need a name to make RAII works properly

std::lock_guard need a name to make RAII works properly
Signed-off-by: Shen-Ta Hsieh <ibmibmibm.tw@gmail.com>
@liewegas liewegas changed the title Fix wrong use of lock_guard os/memstore: Fix wrong use of lock_guard Mar 15, 2018
@@ -566,35 +566,35 @@ class MemStore::OmapIteratorImpl : public ObjectMap::ObjectMapIteratorImpl {
: c(c), o(o), it(o->omap.begin()) {}

int seek_to_first() override {
std::lock_guard<std::mutex>(o->omap_mutex);
std::lock_guard<std::mutex> lock(o->omap_mutex);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, no need to specify the std::mutex template argument anymore, as we've switched to C++17.

@tchaikov tchaikov merged commit 58a84b3 into ceph:master Mar 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants