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/vfs/mount.go | |
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/vfs/mount.go')
-rw-r--r-- | pkg/sentry/vfs/mount.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/sentry/vfs/mount.go b/pkg/sentry/vfs/mount.go index ad2c9fcf4..9912df799 100644 --- a/pkg/sentry/vfs/mount.go +++ b/pkg/sentry/vfs/mount.go @@ -38,6 +38,8 @@ import ( // // Mount is analogous to Linux's struct mount. (gVisor does not distinguish // between struct mount and struct vfsmount.) +// +// +stateify savable type Mount struct { // vfs, fs, and root are immutable. References are held on fs and root. // @@ -85,6 +87,8 @@ type Mount struct { // MountNamespace methods require that a reference is held. // // MountNamespace is analogous to Linux's struct mnt_namespace. +// +// +stateify savable type MountNamespace struct { // root is the MountNamespace's root mount. root is immutable. root *Mount |