overlay: ignore EINVAL for cleanup unmount
ignore EINVAL for unmount in the cleanup function as it means the directory is not a mount point. It can happen if the cleanup happens before the mount point is created. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
This commit is contained in:
parent
8bc8379af2
commit
16b6757422
|
|
@ -1475,10 +1475,14 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO
|
|||
if retErr != nil {
|
||||
if c := d.ctr.Decrement(mergedDir); c <= 0 {
|
||||
if mntErr := unix.Unmount(mergedDir, 0); mntErr != nil {
|
||||
// Ignore EINVAL, it means the directory is not a mount point and it can happen
|
||||
// if the current function fails before the mount point is created.
|
||||
if !errors.Is(mntErr, unix.EINVAL) {
|
||||
logrus.Errorf("Unmounting %v: %v", mergedDir, mntErr)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
readWrite := !inAdditionalStore
|
||||
|
|
|
|||
Loading…
Reference in New Issue