summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/devpts/devpts.go
diff options
context:
space:
mode:
authorDean Deng <deandeng@google.com>2020-09-21 14:46:51 -0700
committergVisor bot <gvisor-bot@google.com>2020-09-21 14:48:23 -0700
commit10dcefbc77815314d56e45f01b8c9986a2c56778 (patch)
tree8401e1b824917410648e38dac92d2b2693d74fe2 /pkg/sentry/fsimpl/devpts/devpts.go
parenta129204cf508b170a62c93ed7148453f346b32e4 (diff)
Use kernfs.Dentry for kernfs.Lookup.
Updates #1193. PiperOrigin-RevId: 332939026
Diffstat (limited to 'pkg/sentry/fsimpl/devpts/devpts.go')
-rw-r--r--pkg/sentry/fsimpl/devpts/devpts.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/devpts/devpts.go b/pkg/sentry/fsimpl/devpts/devpts.go
index f0f2e0be7..e73955126 100644
--- a/pkg/sentry/fsimpl/devpts/devpts.go
+++ b/pkg/sentry/fsimpl/devpts/devpts.go
@@ -198,7 +198,7 @@ func (i *rootInode) Open(ctx context.Context, rp *vfs.ResolvingPath, vfsd *vfs.D
}
// Lookup implements kernfs.Inode.Lookup.
-func (i *rootInode) Lookup(ctx context.Context, name string) (*vfs.Dentry, error) {
+func (i *rootInode) Lookup(ctx context.Context, name string) (*kernfs.Dentry, error) {
idx, err := strconv.ParseUint(name, 10, 32)
if err != nil {
return nil, syserror.ENOENT
@@ -207,7 +207,7 @@ func (i *rootInode) Lookup(ctx context.Context, name string) (*vfs.Dentry, error
defer i.mu.Unlock()
if si, ok := i.replicas[uint32(idx)]; ok {
si.dentry.IncRef()
- return si.dentry.VFSDentry(), nil
+ return &si.dentry, nil
}
return nil, syserror.ENOENT