diff options
author | Nicolas Lacasse <nlacasse@google.com> | 2020-11-03 12:10:01 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-11-03 12:12:06 -0800 |
commit | 723464ec5522b479bceaa253994d4b865300bd95 (patch) | |
tree | 428be4c07303aa877dbe8440a4df41da5015c5c1 /pkg/sentry/fsimpl/tmpfs/named_pipe.go | |
parent | 861c11bfa7c7c27df0f0daa9dc5ee526ba155ea8 (diff) |
Make pipe min/max sizes match linux.
The default pipe size already matched linux, and is unchanged.
Furthermore `atomicIOBytes` is made a proper constant (as it is in Linux). We
were plumbing usermem.PageSize everywhere, so this is no functional change.
PiperOrigin-RevId: 340497006
Diffstat (limited to 'pkg/sentry/fsimpl/tmpfs/named_pipe.go')
-rw-r--r-- | pkg/sentry/fsimpl/tmpfs/named_pipe.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/tmpfs/named_pipe.go b/pkg/sentry/fsimpl/tmpfs/named_pipe.go index d772db9e9..57e7b57b0 100644 --- a/pkg/sentry/fsimpl/tmpfs/named_pipe.go +++ b/pkg/sentry/fsimpl/tmpfs/named_pipe.go @@ -18,7 +18,6 @@ import ( "gvisor.dev/gvisor/pkg/abi/linux" "gvisor.dev/gvisor/pkg/sentry/kernel/auth" "gvisor.dev/gvisor/pkg/sentry/kernel/pipe" - "gvisor.dev/gvisor/pkg/usermem" ) // +stateify savable @@ -32,7 +31,7 @@ type namedPipe struct { // * fs.mu must be locked. // * rp.Mount().CheckBeginWrite() has been called successfully. func (fs *filesystem) newNamedPipe(kuid auth.KUID, kgid auth.KGID, mode linux.FileMode) *inode { - file := &namedPipe{pipe: pipe.NewVFSPipe(true /* isNamed */, pipe.DefaultPipeSize, usermem.PageSize)} + file := &namedPipe{pipe: pipe.NewVFSPipe(true /* isNamed */, pipe.DefaultPipeSize)} file.inode.init(file, fs, kuid, kgid, linux.S_IFIFO|mode) file.inode.nlink = 1 // Only the parent has a link. return &file.inode |