mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Do not ignore error from syscall.Unmount
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
This commit is contained in:
parent
beeec6d103
commit
3f10bdf100
3 changed files with 7 additions and 4 deletions
|
@ -1168,7 +1168,9 @@ func (container *Container) unmountVolumes(forceSyscall bool) error {
|
|||
|
||||
for _, volumeMount := range volumeMounts {
|
||||
if forceSyscall {
|
||||
system.Unmount(volumeMount.Destination)
|
||||
if err := system.Unmount(volumeMount.Destination); err != nil {
|
||||
logrus.Warnf("%s unmountVolumes: Failed to force umount %v", container.ID, err)
|
||||
}
|
||||
}
|
||||
|
||||
if volumeMount.Volume != nil {
|
||||
|
|
|
@ -6,6 +6,6 @@ import "syscall"
|
|||
|
||||
// Unmount is a platform-specific helper function to call
|
||||
// the unmount syscall.
|
||||
func Unmount(dest string) {
|
||||
syscall.Unmount(dest, 0)
|
||||
func Unmount(dest string) error {
|
||||
return syscall.Unmount(dest, 0)
|
||||
}
|
||||
|
|
|
@ -2,5 +2,6 @@ package system
|
|||
|
||||
// Unmount is a platform-specific helper function to call
|
||||
// the unmount syscall. Not supported on Windows
|
||||
func Unmount(dest string) {
|
||||
func Unmount(dest string) error {
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue