summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/kernfs
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-09-24 20:51:31 +0000
committergVisor bot <gvisor-bot@google.com>2020-09-24 20:51:31 +0000
commitfb250ad34cf8dea3e469dc6bb0d59de41e01f4e1 (patch)
tree5c3ffbed156a5e438f8d0920d0ed040d464570d4 /pkg/sentry/fsimpl/kernfs
parent2adc536ecd54049e1751cb6df6a9132e5e5c44e7 (diff)
parent832d91b8058c3c716c648701cf93095dd3157541 (diff)
Merge release-20200914.0-158-g832d91b80 (automated)
Diffstat (limited to 'pkg/sentry/fsimpl/kernfs')
-rw-r--r--pkg/sentry/fsimpl/kernfs/filesystem.go3
-rw-r--r--pkg/sentry/fsimpl/kernfs/kernfs.go2
2 files changed, 3 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/kernfs/filesystem.go b/pkg/sentry/fsimpl/kernfs/filesystem.go
index c2c62341d..11dc24b07 100644
--- a/pkg/sentry/fsimpl/kernfs/filesystem.go
+++ b/pkg/sentry/fsimpl/kernfs/filesystem.go
@@ -132,7 +132,8 @@ func (fs *Filesystem) revalidateChildLocked(ctx context.Context, vfsObj *vfs.Vir
if err != nil {
return nil, err
}
- // Reference on childVFSD dropped by a corresponding Valid.
+ // Reference on c (provided by Lookup) will be dropped when the dentry
+ // fails validation.
parent.InsertChildLocked(name, c)
child = c
}
diff --git a/pkg/sentry/fsimpl/kernfs/kernfs.go b/pkg/sentry/fsimpl/kernfs/kernfs.go
index c4e914530..f543a2065 100644
--- a/pkg/sentry/fsimpl/kernfs/kernfs.go
+++ b/pkg/sentry/fsimpl/kernfs/kernfs.go
@@ -350,7 +350,7 @@ type Inode interface {
// Open creates a file description for the filesystem object represented by
// this inode. The returned file description should hold a reference on the
- // inode for its lifetime.
+ // dentry for its lifetime.
//
// Precondition: rp.Done(). vfsd.Impl() must be the kernfs Dentry containing
// the inode on which Open() is being called.