1
0
mirror of https://github.com/docker/cli.git synced 2026-01-13 18:22:35 +03:00

Merge pull request #27753 from tonistiigi/fix-overlay-unmount

Fix overlay unmount for the root case
Upstream-commit: 1883b73a573fff613f944bb83e24db14d839902c
Component: engine
This commit is contained in:
Michael Crosby
2016-11-10 13:14:45 -08:00
committed by GitHub

View File

@@ -389,6 +389,10 @@ func (d *Driver) Get(id string, mountLabel string) (s string, err error) {
// Put unmounts the mount path created for the give id.
func (d *Driver) Put(id string) error {
// If id has a root, just return
if _, err := os.Stat(path.Join(d.dir(id), "root")); err == nil {
return nil
}
mountpoint := path.Join(d.dir(id), "merged")
if count := d.ctr.Decrement(mountpoint); count > 0 {
return nil