run auplink before unmounting aufs

Upstream-commit: 2f67a62b5b48862948b1ce92aeffbb83c3707ee0
Component: engine
This commit is contained in:
unclejack
2013-06-04 21:30:47 +03:00
parent c822b87ed3
commit 5f39923376

View File

@ -2,13 +2,18 @@ package docker
import (
"fmt"
"github.com/dotcloud/docker/utils"
"os"
"os/exec"
"path/filepath"
"syscall"
"time"
)
func Unmount(target string) error {
if err := exec.Command("auplink", target, "flush").Run(); err != nil {
utils.Debugf("[warning]: couldn't run auplink before unmount: %s", err)
}
if err := syscall.Unmount(target, 0); err != nil {
return err
}