Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
container: Use lazy unmount
Browse files Browse the repository at this point in the history
Unmount recursively to unmount bind-mounted volumes.
Fixes: #965
Signed-off-by: Ning Lu <[email protected]>
  • Loading branch information
luning25 committed Dec 21, 2018
1 parent 8764fc1 commit c099be5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virtcontainers/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c099be5

Please sign in to comment.