diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/volume_internal_common.go | 2 | ||||
-rw-r--r-- | libpod/volume_internal_linux.go | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/libpod/volume_internal_common.go b/libpod/volume_internal_common.go index 440bceec3..c85782e4b 100644 --- a/libpod/volume_internal_common.go +++ b/libpod/volume_internal_common.go @@ -180,7 +180,7 @@ func (v *Volume) unmount(force bool) error { } // Unmount the volume - if err := unix.Unmount(v.config.MountPoint, unix.MNT_DETACH); err != nil { + if err := detachUnmount(v.config.MountPoint); err != nil { if err == unix.EINVAL { // Ignore EINVAL - the mount no longer exists. return nil diff --git a/libpod/volume_internal_linux.go b/libpod/volume_internal_linux.go new file mode 100644 index 000000000..eb4309dc3 --- /dev/null +++ b/libpod/volume_internal_linux.go @@ -0,0 +1,9 @@ +package libpod + +import ( + "golang.org/x/sys/unix" +) + +func detachUnmount(mountPoint string) error { + return unix.Unmount(mountPoint, unix.MNT_DETACH) +} |