kernel: call t.mu.Unlock() explicitly in WithMuLocked

defer here doesn't improve readability, but we know it slower that
the explicit call.

PiperOrigin-RevId: 254441473
This commit is contained in:
Andrei Vagin 2019-06-21 11:54:28 -07:00 committed by gVisor bot
parent 335fd987b0
commit f94653b3de
1 changed files with 1 additions and 1 deletions

View File

@ -703,8 +703,8 @@ func (t *Task) FDMap() *FDMap {
// WithMuLocked executes f with t.mu locked.
func (t *Task) WithMuLocked(f func(*Task)) {
t.mu.Lock()
defer t.mu.Unlock()
f(t)
t.mu.Unlock()
}
// MountNamespace returns t's MountNamespace. MountNamespace does not take an