Skip to content

Commit 7572919

Browse files
committed
mount: remove remaining uses of mount.Self()
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 474abe5 commit 7572919

3 files changed

Lines changed: 2 additions & 58 deletions

File tree

mount/mountinfo_unix.go

Lines changed: 0 additions & 28 deletions
This file was deleted.

mount/mountinfo_unsupported.go

Lines changed: 0 additions & 29 deletions
This file was deleted.

pkg/cri/server/helpers_linux.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
"github.com/containerd/containerd/pkg/apparmor"
3434
"github.com/containerd/containerd/pkg/seccomp"
3535
"github.com/containerd/containerd/pkg/seutil"
36+
"github.com/moby/sys/mountinfo"
3637
"github.com/opencontainers/runtime-spec/specs-go"
3738
"github.com/opencontainers/selinux/go-selinux/label"
3839
"github.com/pkg/errors"
@@ -165,7 +166,7 @@ func openLogFile(path string) (*os.File, error) {
165166
// unmountRecursive unmounts the target and all mounts underneath, starting with
166167
// the deepest mount first.
167168
func unmountRecursive(ctx context.Context, target string) error {
168-
mounts, err := mount.Self()
169+
mounts, err := mountinfo.GetMounts(nil)
169170
if err != nil {
170171
return err
171172
}

0 commit comments

Comments
 (0)