diff options
author | Andrei Vagin <avagin@google.com> | 2019-06-21 11:54:28 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-06-21 11:55:42 -0700 |
commit | f94653b3dea629f365ce5742b99bbcaa7673ded2 (patch) | |
tree | 5808ea6cdbb3fa41ff8428de46c217dd8e55c871 | |
parent | 335fd987b0d4f7c8e9a720b68fa5f3848500db51 (diff) |
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
-rw-r--r-- | pkg/sentry/kernel/task.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/kernel/task.go b/pkg/sentry/kernel/task.go index 7ed589a02..c297c5973 100644 --- a/pkg/sentry/kernel/task.go +++ b/pkg/sentry/kernel/task.go @@ -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 |