diff options
Diffstat (limited to 'pkg/sentry/fs/dirent.go')
-rw-r--r-- | pkg/sentry/fs/dirent.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/sentry/fs/dirent.go b/pkg/sentry/fs/dirent.go index 554aa30d8..b56437b3c 100644 --- a/pkg/sentry/fs/dirent.go +++ b/pkg/sentry/fs/dirent.go @@ -213,7 +213,12 @@ func NewDirent(inode *Inode, name string) *Dirent { // NewTransientDirent creates a transient Dirent that shouldn't actually be // visible to users. +// +// An Inode is required. func NewTransientDirent(inode *Inode) *Dirent { + if inode == nil { + panic("an inode is required") + } return newDirent(inode, "transient") } |