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

msg/simple: fix missing unlock when already bind #13267

Merged
merged 2 commits into from Feb 20, 2017

Conversation

yuyuyu101
Copy link
Member

Signed-off-by: Haomai Wang haomai@xsky.com

Signed-off-by: Haomai Wang <haomai@xsky.com>
@yuyuyu101
Copy link
Member Author

caused by #12901

@liuchang0812
Copy link
Contributor

hi, @yuyuyu101

AsyncMessager::client_bind also need this patch.

@@ -312,6 +312,7 @@ int SimpleMessenger::client_bind(const entity_addr_t &bind_addr)
lock.Lock();
if (did_bind) {
assert(my_inst.addr == bind_addr);
lock.Unlock();
Copy link
Contributor

Choose a reason for hiding this comment

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

AsyncMessager::client_bind also need this patch.

@yuyuyu101
Copy link
Member Author

thanks, done

Copy link
Contributor

@liuchang0812 liuchang0812 left a comment

Choose a reason for hiding this comment

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

lgtm thanks

@@ -396,6 +396,7 @@ int AsyncMessenger::client_bind(const entity_addr_t &bind_addr)
lock.Lock();
if (did_bind) {
assert(my_inst.addr == bind_addr);
lock.Unlock();
Copy link
Contributor

@tchaikov tchaikov Feb 6, 2017

Choose a reason for hiding this comment

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

nit, better off using Mutex::Locker. or instead switch to std::mutex, and use std::lock_guard instead.

Signed-off-by: Haomai Wang <haomai@xsky.com>
@yuyuyu101
Copy link
Member Author

@tchaikov done

@tchaikov
Copy link
Contributor

@tchaikov tchaikov merged commit c119da5 into ceph:master Feb 20, 2017
@yuyuyu101 yuyuyu101 deleted the wip-fix-lock branch February 20, 2017 03:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants