storage/nfs: use class ScopeUnlock
This commit is contained in:
parent
0e48747607
commit
84c406d5f5
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user