fix Put without Get in aufs
this Patch is ported from 3916561619d45a3d8ca17dfa467149824111023a Signed-off-by: Liu Hua <sdu.liu@huawei.com> Upstream-commit: 451f7517733087a8629fe20894b6c10a63bb155e Component: engine
This commit is contained in:
@@ -332,6 +332,14 @@ func (a *Driver) Put(id string) error {
|
||||
|
||||
m := a.active[id]
|
||||
if m == nil {
|
||||
// but it might be still here
|
||||
if a.Exists(id) {
|
||||
path := path.Join(a.rootPath(), "mnt", id)
|
||||
err := Unmount(path)
|
||||
if err != nil {
|
||||
logrus.Debugf("Failed to unmount %s aufs: %v", id, err)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
if count := m.referenceCount; count > 1 {
|
||||
|
||||
Reference in New Issue
Block a user