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

storage/nfs: use class ScopeUnlock

parent 0e487476
...@@ -173,9 +173,11 @@ private: ...@@ -173,9 +173,11 @@ private:
switch (state) { switch (state) {
case State::INITIAL: case State::INITIAL:
/* schedule connect */ /* schedule connect */
mutex.unlock(); {
defer_connect.Schedule(); const ScopeUnlock unlock(mutex);
mutex.lock(); defer_connect.Schedule();
}
if (state == State::INITIAL) if (state == State::INITIAL)
cond.wait(mutex); cond.wait(mutex);
break; 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