From f94653b3dea629f365ce5742b99bbcaa7673ded2 Mon Sep 17 00:00:00 2001 From: Andrei Vagin Date: Fri, 21 Jun 2019 11:54:28 -0700 Subject: 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 --- pkg/sentry/kernel/task.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pkg') 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 -- cgit v1.2.3