Skip to content

Commit 8048966

Browse files
committed
Should use mount.UnmountMounts for unmounting submounts
See PR containerd/containerd#7839 and commit 34d587818596 ("Use mount.Target to specify subdirectory of rootfs mount") for more details. Signed-off-by: Gao Xiang <[email protected]>
1 parent c3dd63f commit 8048966

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/cmd/container/run_mount.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ func generateMountOpts(ctx context.Context, client *containerd.Client, ensuredIm
175175

176176
// windows has additional steps for mounting see
177177
// https://github.com/containerd/containerd/commit/791e175c79930a34cfbb2048fbcaa8493fd2c86b
178-
unmounter := func(mountPath string) {
179-
if uerr := mount.Unmount(mountPath, 0); uerr != nil {
178+
unmounter := func(tempDir string) {
179+
if uerr := mount.UnmountMounts(mounts, tempDir, 0); uerr != nil {
180180
log.G(ctx).Debugf("Failed to unmount snapshot %q", tempDir)
181181
if err == nil {
182182
err = uerr

0 commit comments

Comments
 (0)