summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/vfs/vfs.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-05-29 02:18:38 +0000
committergVisor bot <gvisor-bot@google.com>2020-05-29 02:18:38 +0000
commitd00bd5bdee15b028787faa81288ebc56ad0abf84 (patch)
tree6ef2f56d257e28672850548c2122106912e88e35 /pkg/sentry/vfs/vfs.go
parent78d4cf6d3a7ce48cd011909c4a5bc2b7cd44e139 (diff)
parent50844fee29aed500fff41f417f6183867ca0f0b5 (diff)
Merge release-20200522.0-26-g50844fee (automated)
Diffstat (limited to 'pkg/sentry/vfs/vfs.go')
-rw-r--r--pkg/sentry/vfs/vfs.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/sentry/vfs/vfs.go b/pkg/sentry/vfs/vfs.go
index 8d7f8f8af..6d2ba53ea 100644
--- a/pkg/sentry/vfs/vfs.go
+++ b/pkg/sentry/vfs/vfs.go
@@ -82,6 +82,10 @@ type VirtualFilesystem struct {
// mountpoints is analogous to Linux's mountpoint_hashtable.
mountpoints map[*Dentry]map[*Mount]struct{}
+ // lastMountID is the last allocated mount ID. lastMountID is accessed
+ // using atomic memory operations.
+ lastMountID uint64
+
// anonMount is a Mount, not included in mounts or mountpoints,
// representing an anonFilesystem. anonMount is used to back
// VirtualDentries returned by VirtualFilesystem.NewAnonVirtualDentry().