diff options
author | Jamie Liu <jamieliu@google.com> | 2020-01-22 12:27:16 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-01-22 12:29:36 -0800 |
commit | 5ab1213a6c405071546c783d6d93b4e9af52842e (patch) | |
tree | 5671161794ad450b7d898b7dd01fbddde2376ab2 /pkg/sentry/fsimpl/tmpfs/named_pipe.go | |
parent | 159992300ddb2924cfbf1de57591a78ea27a3a4b (diff) |
Move VFS2 handling of FD readability/writability to vfs.FileDescription.
PiperOrigin-RevId: 291006713
Diffstat (limited to 'pkg/sentry/fsimpl/tmpfs/named_pipe.go')
-rw-r--r-- | pkg/sentry/fsimpl/tmpfs/named_pipe.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pkg/sentry/fsimpl/tmpfs/named_pipe.go b/pkg/sentry/fsimpl/tmpfs/named_pipe.go index 40bde54de..482aabd52 100644 --- a/pkg/sentry/fsimpl/tmpfs/named_pipe.go +++ b/pkg/sentry/fsimpl/tmpfs/named_pipe.go @@ -50,11 +50,10 @@ type namedPipeFD struct { func newNamedPipeFD(ctx context.Context, np *namedPipe, rp *vfs.ResolvingPath, vfsd *vfs.Dentry, flags uint32) (*vfs.FileDescription, error) { var err error var fd namedPipeFD - fd.VFSPipeFD, err = np.pipe.NewVFSPipeFD(ctx, rp, vfsd, &fd.vfsfd, flags) + fd.VFSPipeFD, err = np.pipe.NewVFSPipeFD(ctx, vfsd, &fd.vfsfd, flags) if err != nil { return nil, err } - mnt := rp.Mount() - fd.vfsfd.Init(&fd, flags, mnt, vfsd, &vfs.FileDescriptionOptions{}) + fd.vfsfd.Init(&fd, flags, rp.Mount(), vfsd, &vfs.FileDescriptionOptions{}) return &fd.vfsfd, nil } |