github.com/devdivbcp/moby@v17.12.0-ce-rc1.0.20200726071732-2d4bfdc789ad+incompatible/pkg/mount/unmount_unix.go (about) 1 // +build !windows 2 3 package mount // import "github.com/docker/docker/pkg/mount" 4 5 import "golang.org/x/sys/unix" 6 7 func unmount(target string, flags int) error { 8 err := unix.Unmount(target, flags) 9 if err == nil || err == unix.EINVAL { 10 // Ignore "not mounted" error here. Note the same error 11 // can be returned if flags are invalid, so this code 12 // assumes that the flags value is always correct. 13 return nil 14 } 15 16 return &mountError{ 17 op: "umount", 18 target: target, 19 flags: uintptr(flags), 20 err: err, 21 } 22 }