summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/ext/dentry.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/fs/ext/dentry.go')
-rw-r--r--pkg/sentry/fs/ext/dentry.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/sentry/fs/ext/dentry.go b/pkg/sentry/fs/ext/dentry.go
index 07be99a84..054fb42b6 100644
--- a/pkg/sentry/fs/ext/dentry.go
+++ b/pkg/sentry/fs/ext/dentry.go
@@ -31,6 +31,15 @@ type dentry struct {
// Compiles only if dentry implements vfs.DentryImpl.
var _ vfs.DentryImpl = (*dentry)(nil)
+// newDentry is the dentry constructor.
+func newDentry(in *inode) *dentry {
+ d := &dentry{
+ inode: in,
+ }
+ d.vfsd.Init(d)
+ return d
+}
+
// IncRef implements vfs.DentryImpl.IncRef.
func (d *dentry) IncRef(vfsfs *vfs.Filesystem) {
d.inode.incRef()