summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/proc/subtasks.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/proc/subtasks.go
parenta129204cf508b170a62c93ed7148453f346b32e4 (diff)
Use kernfs.Dentry for kernfs.Lookup.
Updates #1193. PiperOrigin-RevId: 332939026
Diffstat (limited to 'pkg/sentry/fsimpl/proc/subtasks.go')
-rw-r--r--pkg/sentry/fsimpl/proc/subtasks.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/sentry/fsimpl/proc/subtasks.go b/pkg/sentry/fsimpl/proc/subtasks.go
index 57f026040..7277e431e 100644
--- a/pkg/sentry/fsimpl/proc/subtasks.go
+++ b/pkg/sentry/fsimpl/proc/subtasks.go
@@ -69,7 +69,7 @@ func (fs *filesystem) newSubtasks(task *kernel.Task, pidns *kernel.PIDNamespace,
}
// Lookup implements kernfs.inodeDynamicLookup.Lookup.
-func (i *subtasksInode) Lookup(ctx context.Context, name string) (*vfs.Dentry, error) {
+func (i *subtasksInode) Lookup(ctx context.Context, name string) (*kernfs.Dentry, error) {
tid, err := strconv.ParseUint(name, 10, 32)
if err != nil {
return nil, syserror.ENOENT
@@ -82,9 +82,7 @@ func (i *subtasksInode) Lookup(ctx context.Context, name string) (*vfs.Dentry, e
if subTask.ThreadGroup() != i.task.ThreadGroup() {
return nil, syserror.ENOENT
}
-
- subTaskDentry := i.fs.newTaskInode(subTask, i.pidns, false, i.cgroupControllers)
- return subTaskDentry.VFSDentry(), nil
+ return i.fs.newTaskInode(subTask, i.pidns, false, i.cgroupControllers), nil
}
// IterDirents implements kernfs.inodeDynamicLookup.IterDirents.