Skip to content

Commit

Permalink
Merge pull request #1687 from flouthoc/put-ignore-einval
Browse files Browse the repository at this point in the history
overlay: Put should ignore `ENINVAL` for Unmount
  • Loading branch information
rhatdan authored Aug 14, 2023
2 parents 82ebd53 + 6469e60 commit 7a27553
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/overlay/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -1879,7 +1879,9 @@ func (d *Driver) Put(id string) error {
if !unmounted {
if err := unix.Unmount(mountpoint, unix.MNT_DETACH); err != nil && !os.IsNotExist(err) {
logrus.Debugf("Failed to unmount %s overlay: %s - %v", id, mountpoint, err)
return fmt.Errorf("unmounting %q: %w", mountpoint, err)
if !errors.Is(err, unix.EINVAL) {
return fmt.Errorf("unmounting %q: %w", mountpoint, err)
}
}
}

Expand Down

0 comments on commit 7a27553

Please sign in to comment.