1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #33638 from coolljt0725/mnt_deatch

Use lazy umount on Put for overlay2 and overlay
This commit is contained in:
Brian Goff 2017-06-12 18:58:55 -05:00 committed by GitHub
commit ff2127968d
2 changed files with 2 additions and 2 deletions

View file

@ -404,7 +404,7 @@ func (d *Driver) Put(id string) error {
if count := d.ctr.Decrement(mountpoint); count > 0 {
return nil
}
if err := syscall.Unmount(mountpoint, 0); err != nil {
if err := syscall.Unmount(mountpoint, syscall.MNT_DETACH); err != nil {
logrus.Debugf("Failed to unmount %s overlay: %v", id, err)
}
return nil

View file

@ -587,7 +587,7 @@ func (d *Driver) Put(id string) error {
if count := d.ctr.Decrement(mountpoint); count > 0 {
return nil
}
if err := syscall.Unmount(mountpoint, 0); err != nil {
if err := syscall.Unmount(mountpoint, syscall.MNT_DETACH); err != nil {
logrus.Debugf("Failed to unmount %s overlay: %s - %v", id, mountpoint, err)
}
return nil