diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-02-14 13:39:51 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-14 13:40:39 -0800 |
commit | e4c7f3e6f6c19f3259820a4c41b69e85c0454379 (patch) | |
tree | c63b9ac4d97a715a226feba4fbbd5cab03bb6743 /pkg/sentry/control | |
parent | 50c493193b72997a6b09f353fd9217349941c494 (diff) |
Inline vfs.VirtualFilesystem in Kernel struct
This saves one pointer dereference per VFS access.
Updates #1623
PiperOrigin-RevId: 295216176
Diffstat (limited to 'pkg/sentry/control')
-rw-r--r-- | pkg/sentry/control/proc.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/control/proc.go b/pkg/sentry/control/proc.go index 8973754c8..5457ba5e7 100644 --- a/pkg/sentry/control/proc.go +++ b/pkg/sentry/control/proc.go @@ -199,7 +199,7 @@ func (proc *Proc) execAsync(args *ExecArgs) (*kernel.ThreadGroup, kernel.ThreadI } paths := fs.GetPath(initArgs.Envv) - vfsObj := proc.Kernel.VFS + vfsObj := proc.Kernel.VFS() file, err := ResolveExecutablePath(ctx, vfsObj, initArgs.WorkingDirectory, initArgs.Argv[0], paths) if err != nil { return nil, 0, nil, fmt.Errorf("error finding executable %q in PATH %v: %v", initArgs.Argv[0], paths, err) |