diff options
author | Ayush Ranjan <ayushranjan@google.com> | 2021-10-26 16:57:12 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-10-26 17:00:07 -0700 |
commit | 7b8f19dc76a9fecbf4d2e5f43a47c6d47d53e100 (patch) | |
tree | 632c24c56d874298eb2cca543ec5e5aee01df30f /pkg/sentry/fsimpl/mqfs/registry.go | |
parent | f54a25c1f03e705f2fb65be7389ddeb37bc5e64e (diff) |
Simplify vfs.NewDisconnectedMount signature and callpoints.
vfs.NewDisconnectedMount has no error paths. Its much prettier without the
error return value.
Also simplify MountDisconnected which would immediately drop the refs taken by
NewDisconnectedMount. Instead make it directly call newMount.
PiperOrigin-RevId: 405767966
Diffstat (limited to 'pkg/sentry/fsimpl/mqfs/registry.go')
-rw-r--r-- | pkg/sentry/fsimpl/mqfs/registry.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pkg/sentry/fsimpl/mqfs/registry.go b/pkg/sentry/fsimpl/mqfs/registry.go index e470ffadc..69182965c 100644 --- a/pkg/sentry/fsimpl/mqfs/registry.go +++ b/pkg/sentry/fsimpl/mqfs/registry.go @@ -71,10 +71,7 @@ func NewRegistryImpl(ctx context.Context, vfsObj *vfs.VirtualFilesystem, creds * var dentry kernfs.Dentry dentry.InitRoot(&fs.Filesystem, fs.newRootInode(ctx, creds)) - mount, err := vfsObj.NewDisconnectedMount(vfsfs, dentry.VFSDentry(), &vfs.MountOptions{}) - if err != nil { - return nil, err - } + mount := vfsObj.NewDisconnectedMount(vfsfs, dentry.VFSDentry(), &vfs.MountOptions{}) return &RegistryImpl{ root: &dentry, |