mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user