From c099be56da4bb7e8df7890baf7865b5e7d006fd0 Mon Sep 17 00:00:00 2001 From: running Date: Sun, 2 Dec 2018 22:02:55 +0800 Subject: [PATCH] container: Use lazy unmount Unmount recursively to unmount bind-mounted volumes. Fixes: #965 Signed-off-by: Ning Lu --- virtcontainers/container.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virtcontainers/container.go b/virtcontainers/container.go index fff67f4fb0..2b0552f6b3 100644 --- a/virtcontainers/container.go +++ b/virtcontainers/container.go @@ -544,7 +544,7 @@ func (c *Container) unmountHostMounts() error { span, _ := c.trace("unmount") span.SetTag("host-path", m.HostPath) - if err := syscall.Unmount(m.HostPath, 0); err != nil { + if err := syscall.Unmount(m.HostPath, syscall.MNT_DETACH); err != nil { c.Logger().WithFields(logrus.Fields{ "host-path": m.HostPath, "error": err,