diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-08-28 21:35:00 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-08-28 21:35:00 +0000 |
commit | 62daea73a85389e465e8b53a0dce9ac1f080e049 (patch) | |
tree | 1951814a20c0a868e3146dff0da000228f482785 /pkg/sentry/fsimpl/pipefs | |
parent | 91b955365d69946173b510f727d843103e8c79b6 (diff) | |
parent | b4820e598681c61fbf0e8a7f4d3436d2599ce53c (diff) |
Merge release-20200818.0-84-gb4820e598 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/pipefs')
-rw-r--r-- | pkg/sentry/fsimpl/pipefs/pipefs.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pkg/sentry/fsimpl/pipefs/pipefs.go b/pkg/sentry/fsimpl/pipefs/pipefs.go index 2ca793db9..7053ad6db 100644 --- a/pkg/sentry/fsimpl/pipefs/pipefs.go +++ b/pkg/sentry/fsimpl/pipefs/pipefs.go @@ -143,14 +143,16 @@ func (i *inode) SetStat(ctx context.Context, vfsfs *vfs.Filesystem, creds *auth. return syserror.EPERM } -// TODO(gvisor.dev/issue/1193): kernfs does not provide a way to implement -// statfs, from which we should indicate PIPEFS_MAGIC. - // Open implements kernfs.Inode.Open. func (i *inode) Open(ctx context.Context, rp *vfs.ResolvingPath, vfsd *vfs.Dentry, opts vfs.OpenOptions) (*vfs.FileDescription, error) { return i.pipe.Open(ctx, rp.Mount(), vfsd, opts.Flags, &i.locks) } +// StatFS implements kernfs.Inode.StatFS. +func (i *inode) StatFS(ctx context.Context, fs *vfs.Filesystem) (linux.Statfs, error) { + return vfs.GenericStatFS(linux.PIPEFS_MAGIC), nil +} + // NewConnectedPipeFDs returns a pair of FileDescriptions representing the read // and write ends of a newly-created pipe, as for pipe(2) and pipe2(2). // |