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

mon: fix locking in preinit error paths #7353

Merged
merged 1 commit into from Jan 26, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/mon/Monitor.cc
Expand Up @@ -550,6 +550,7 @@ int Monitor::preinit()
int r = sanitize_options();
if (r < 0) {
derr << "option sanitization failed!" << dendl;
lock.Unlock();
return r;
}

Expand Down Expand Up @@ -639,6 +640,7 @@ int Monitor::preinit()
<< "'mon_force_quorum_join' is set -- allowing boot" << dendl;
} else {
derr << "commit suicide!" << dendl;
lock.Unlock();
return -ENOENT;
}
}
Expand Down