mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-03 02:26:37 +00:00
container: Use lazy unmount
Unmount recursively to unmount bind-mounted volumes. Fixes: #965 Signed-off-by: Ning Lu <crossrunning@outlook.com>
This commit is contained in:
parent
8764fc1467
commit
c099be56da
@ -544,7 +544,7 @@ func (c *Container) unmountHostMounts() error {
|
|||||||
span, _ := c.trace("unmount")
|
span, _ := c.trace("unmount")
|
||||||
span.SetTag("host-path", m.HostPath)
|
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{
|
c.Logger().WithFields(logrus.Fields{
|
||||||
"host-path": m.HostPath,
|
"host-path": m.HostPath,
|
||||||
"error": err,
|
"error": err,
|
||||||
|
Loading…
Reference in New Issue
Block a user