diff options
author | Jamie Liu <jamieliu@google.com> | 2020-05-07 14:00:36 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-05-07 14:01:53 -0700 |
commit | 9115f26851b6f00ae01e9c130e3b5b342495c9e5 (patch) | |
tree | 1bf2b1e7a6f461d82d34f68a6c607b8c2253bf63 /runsc | |
parent | 1f4087e7cd6c3cc696e6b26446abd6c5214cfd67 (diff) |
Allocate device numbers for VFS2 filesystems.
Updates #1197, #1198, #1672
PiperOrigin-RevId: 310432006
Diffstat (limited to 'runsc')
-rw-r--r-- | runsc/boot/loader.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runsc/boot/loader.go b/runsc/boot/loader.go index 8c8bad11c..f802bc9fb 100644 --- a/runsc/boot/loader.go +++ b/runsc/boot/loader.go @@ -334,7 +334,10 @@ func New(args Args) (*Loader, error) { if kernel.VFS2Enabled { // Set up host mount that will be used for imported fds. - hostFilesystem := hostvfs2.NewFilesystem(k.VFS()) + hostFilesystem, err := hostvfs2.NewFilesystem(k.VFS()) + if err != nil { + return nil, fmt.Errorf("failed to create hostfs filesystem: %v", err) + } defer hostFilesystem.DecRef() hostMount, err := k.VFS().NewDisconnectedMount(hostFilesystem, nil, &vfs.MountOptions{}) if err != nil { |