2015-04-27 10:53:12 -04:00
|
|
|
// +build linux
|
|
|
|
|
2018-02-05 16:05:59 -05:00
|
|
|
package aufs // import "github.com/docker/docker/daemon/graphdriver/aufs"
|
2013-03-21 01:41:03 -04:00
|
|
|
|
|
|
|
import (
|
2013-06-04 14:30:47 -04:00
|
|
|
"os/exec"
|
2014-07-24 16:37:44 -04:00
|
|
|
|
2017-05-23 10:22:32 -04:00
|
|
|
"golang.org/x/sys/unix"
|
2013-03-21 01:41:03 -04:00
|
|
|
)
|
|
|
|
|
2015-07-21 22:15:14 -04:00
|
|
|
// Unmount the target specified.
|
2013-03-21 01:41:03 -04:00
|
|
|
func Unmount(target string) error {
|
2013-06-04 14:30:47 -04:00
|
|
|
if err := exec.Command("auplink", target, "flush").Run(); err != nil {
|
2018-05-03 17:08:25 -04:00
|
|
|
logger.WithError(err).Warnf("Couldn't run auplink before unmount %s", target)
|
2013-06-04 14:30:47 -04:00
|
|
|
}
|
2018-01-14 18:42:25 -05:00
|
|
|
return unix.Unmount(target, 0)
|
2013-03-21 01:41:03 -04:00
|
|
|
}
|