diff options
author | gVisor bot <gvisor-bot@google.com> | 2019-12-27 08:27:00 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-12-27 08:27:00 +0000 |
commit | 9c8909c933e58af2b9d20dc805b4d599317389d4 (patch) | |
tree | 219215ddc02d860bd56c73bc0229b22aaf6f847b /pkg/sentry/vfs/vfs.go | |
parent | a69bbf7322da8463898947dce0d9ce840551efa4 (diff) | |
parent | 796f53c0befc21570b185811e26b74e71950dfc3 (diff) |
Merge release-20191213.0-55-g796f53c (automated)
Diffstat (limited to 'pkg/sentry/vfs/vfs.go')
-rwxr-xr-x | pkg/sentry/vfs/vfs.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/sentry/vfs/vfs.go b/pkg/sentry/vfs/vfs.go index 3e4df8558..a3bdb5805 100755 --- a/pkg/sentry/vfs/vfs.go +++ b/pkg/sentry/vfs/vfs.go @@ -75,23 +75,23 @@ type VirtualFilesystem struct { // mountpoints is analogous to Linux's mountpoint_hashtable. mountpoints map[*Dentry]map[*Mount]struct{} + // fsTypes contains all registered FilesystemTypes. fsTypes is protected by + // fsTypesMu. + fsTypesMu sync.RWMutex + fsTypes map[string]*registeredFilesystemType + // filesystems contains all Filesystems. filesystems is protected by // filesystemsMu. filesystemsMu sync.Mutex filesystems map[*Filesystem]struct{} - - // fsTypes contains all FilesystemTypes that are usable in the - // VirtualFilesystem. fsTypes is protected by fsTypesMu. - fsTypesMu sync.RWMutex - fsTypes map[string]FilesystemType } // New returns a new VirtualFilesystem with no mounts or FilesystemTypes. func New() *VirtualFilesystem { vfs := &VirtualFilesystem{ mountpoints: make(map[*Dentry]map[*Mount]struct{}), + fsTypes: make(map[string]*registeredFilesystemType), filesystems: make(map[*Filesystem]struct{}), - fsTypes: make(map[string]FilesystemType), } vfs.mounts.Init() return vfs |