mount: remove remaining uses of mount.Self()

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2020-09-28 11:36:41 +02:00
parent 474abe5723
commit 7572919201
3 changed files with 2 additions and 58 deletions

View File

@@ -33,6 +33,7 @@ import (
"github.com/containerd/containerd/pkg/apparmor"
"github.com/containerd/containerd/pkg/seccomp"
"github.com/containerd/containerd/pkg/seutil"
"github.com/moby/sys/mountinfo"
"github.com/opencontainers/runtime-spec/specs-go"
"github.com/opencontainers/selinux/go-selinux/label"
"github.com/pkg/errors"
@@ -165,7 +166,7 @@ func openLogFile(path string) (*os.File, error) {
// unmountRecursive unmounts the target and all mounts underneath, starting with
// the deepest mount first.
func unmountRecursive(ctx context.Context, target string) error {
mounts, err := mount.Self()
mounts, err := mountinfo.GetMounts(nil)
if err != nil {
return err
}