diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-03-12 01:06:00 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-12 01:06:00 +0000 |
commit | 8a7964657411d80c685128531099d6c246216f12 (patch) | |
tree | 43a12cad4774774951da1548519e59ecff0050ae /pkg/sentry/fsimpl/overlay | |
parent | 3bbc07ece91af55682430e6ae2a30060f5f7fd9c (diff) | |
parent | c5667022b6617d732e0c0bcb8ca3b58d588ceafb (diff) |
Merge release-20210301.0-37-gc5667022b (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/overlay')
-rw-r--r-- | pkg/sentry/fsimpl/overlay/filesystem.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/overlay/filesystem.go b/pkg/sentry/fsimpl/overlay/filesystem.go index 917709d75..84e37f793 100644 --- a/pkg/sentry/fsimpl/overlay/filesystem.go +++ b/pkg/sentry/fsimpl/overlay/filesystem.go @@ -1764,3 +1764,15 @@ func (fs *filesystem) PrependPath(ctx context.Context, vfsroot, vd vfs.VirtualDe defer fs.renameMu.RUnlock() return genericPrependPath(vfsroot, vd.Mount(), vd.Dentry().Impl().(*dentry), b) } + +// MountOptions implements vfs.FilesystemImpl.MountOptions. +func (fs *filesystem) MountOptions() string { + // Return the mount options from the topmost layer. + var vd vfs.VirtualDentry + if fs.opts.UpperRoot.Ok() { + vd = fs.opts.UpperRoot + } else { + vd = fs.opts.LowerRoots[0] + } + return vd.Mount().Filesystem().Impl().MountOptions() +} |