github.com/gunjan5/docker@v1.8.2/daemon/graphdriver/aufs/mount.go (about) 1 // +build linux 2 3 package aufs 4 5 import ( 6 "os/exec" 7 "syscall" 8 9 "github.com/Sirupsen/logrus" 10 ) 11 12 func Unmount(target string) error { 13 if err := exec.Command("auplink", target, "flush").Run(); err != nil { 14 logrus.Errorf("Couldn't run auplink before unmount: %s", err) 15 } 16 if err := syscall.Unmount(target, 0); err != nil { 17 return err 18 } 19 return nil 20 }