From c4815af9475cc4680c6d598d9c930de892c98aae Mon Sep 17 00:00:00 2001 From: Fabricio Voznika Date: Wed, 8 Jul 2020 17:10:35 -0700 Subject: Add shared mount hints to VFS2 Container restart test is disabled for VFS2 for now. Updates #1487 PiperOrigin-RevId: 320296401 --- pkg/sentry/vfs/vfs.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'pkg/sentry/vfs/vfs.go') diff --git a/pkg/sentry/vfs/vfs.go b/pkg/sentry/vfs/vfs.go index 58c7ad778..522e27475 100644 --- a/pkg/sentry/vfs/vfs.go +++ b/pkg/sentry/vfs/vfs.go @@ -123,6 +123,9 @@ type VirtualFilesystem struct { // Init initializes a new VirtualFilesystem with no mounts or FilesystemTypes. func (vfs *VirtualFilesystem) Init() error { + if vfs.mountpoints != nil { + panic("VFS already initialized") + } vfs.mountpoints = make(map[*Dentry]map[*Mount]struct{}) vfs.devices = make(map[devTuple]*registeredDevice) vfs.anonBlockDevMinorNext = 1 -- cgit v1.2.3