summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/tty/dir.go
diff options
context:
space:
mode:
authorIan Gudger <igudger@google.com>2019-06-13 18:39:43 -0700
committerShentubot <shentubot@google.com>2019-06-13 18:40:38 -0700
commit3e9b8ecbfe21ba6c8c788be469fc6cea6a4a40b7 (patch)
tree8a1b2a0e64c013503ff30bf4b49b28764db52680 /pkg/sentry/fs/tty/dir.go
parent0a5ee6f7b20ef4f5533766d753b85005f79ae613 (diff)
Plumb context through more layers of filesytem.
All functions which allocate objects containing AtomicRefCounts will soon need a context. PiperOrigin-RevId: 253147709
Diffstat (limited to 'pkg/sentry/fs/tty/dir.go')
-rw-r--r--pkg/sentry/fs/tty/dir.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/sentry/fs/tty/dir.go b/pkg/sentry/fs/tty/dir.go
index 679057d1f..58a26742c 100644
--- a/pkg/sentry/fs/tty/dir.go
+++ b/pkg/sentry/fs/tty/dir.go
@@ -114,7 +114,7 @@ func newDir(ctx context.Context, m *fs.MountSource) *fs.Inode {
InodeID: d.master.StableAttr.InodeID,
})
- return fs.NewInode(d, m, fs.StableAttr{
+ return fs.NewInode(ctx, d, m, fs.StableAttr{
DeviceID: ptsDevice.DeviceID(),
// N.B. Linux always uses inode id 1 for the directory. See
// fs/devpts/inode.c:devpts_fill_super.
@@ -143,7 +143,7 @@ func (d *dirInodeOperations) Lookup(ctx context.Context, dir *fs.Inode, name str
// Master?
if name == "ptmx" {
d.master.IncRef()
- return fs.NewDirent(d.master, name), nil
+ return fs.NewDirent(ctx, d.master, name), nil
}
// Slave number?
@@ -159,7 +159,7 @@ func (d *dirInodeOperations) Lookup(ctx context.Context, dir *fs.Inode, name str
}
s.IncRef()
- return fs.NewDirent(s, name), nil
+ return fs.NewDirent(ctx, s, name), nil
}
// Create implements fs.InodeOperations.Create.