storage/nfs: use class ScopeUnlock

This commit is contained in:
Max Kellermann 2019-04-25 19:22:49 +02:00
parent 0e48747607
commit 84c406d5f5

View File

@ -173,9 +173,11 @@ private:
switch (state) { switch (state) {
case State::INITIAL: case State::INITIAL:
/* schedule connect */ /* schedule connect */
mutex.unlock(); {
const ScopeUnlock unlock(mutex);
defer_connect.Schedule(); defer_connect.Schedule();
mutex.lock(); }
if (state == State::INITIAL) if (state == State::INITIAL)
cond.wait(mutex); cond.wait(mutex);
break; break;