summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/ext/ext.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/fs/ext/ext.go')
-rw-r--r--pkg/sentry/fs/ext/ext.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/pkg/sentry/fs/ext/ext.go b/pkg/sentry/fs/ext/ext.go
index c8b554f4d..2604169de 100644
--- a/pkg/sentry/fs/ext/ext.go
+++ b/pkg/sentry/fs/ext/ext.go
@@ -131,7 +131,12 @@ func (fstype filesystemType) NewFilesystem(ctx context.Context, creds *auth.Cred
return nil, nil, err
}
- return &fs.vfsfs, nil, nil
+ rootInode, err := fs.getOrCreateInode(disklayout.RootDirInode)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ return &fs.vfsfs, &newDentry(rootInode).vfsd, nil
}
// getOrCreateInode gets the inode corresponding to the inode number passed in.