Commit 84c406d5 authored by Max Kellermann's avatar Max Kellermann

storage/nfs: use class ScopeUnlock

parent 0e487476
......@@ -173,9 +173,11 @@ private:
switch (state) {
case State::INITIAL:
/* schedule connect */
mutex.unlock();
defer_connect.Schedule();
mutex.lock();
{
const ScopeUnlock unlock(mutex);
defer_connect.Schedule();
}
if (state == State::INITIAL)
cond.wait(mutex);
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment