summaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
Diffstat (limited to 'libpod')
-rw-r--r--libpod/container_internal.go4
-rw-r--r--libpod/storage.go12
2 files changed, 8 insertions, 8 deletions
diff --git a/libpod/container_internal.go b/libpod/container_internal.go
index 010d01315..38099c6ac 100644
--- a/libpod/container_internal.go
+++ b/libpod/container_internal.go
@@ -415,7 +415,7 @@ func (c *Container) export(path string) error {
}
mountPoint = mount
defer func() {
- if err := c.runtime.store.Unmount(c.ID()); err != nil {
+ if _, err := c.runtime.store.Unmount(c.ID(), false); err != nil {
logrus.Errorf("error unmounting container %q: %v", c.ID(), err)
}
}()
@@ -797,7 +797,7 @@ func (c *Container) cleanupStorage() error {
}
// Also unmount storage
- if err := c.runtime.storageService.UnmountContainerImage(c.ID()); err != nil {
+ if _, err := c.runtime.storageService.UnmountContainerImage(c.ID()); err != nil {
// If the container has already been removed, warn but don't
// error
// We still want to be able to kick the container out of the
diff --git a/libpod/storage.go b/libpod/storage.go
index b969df7f3..ff366edf2 100644
--- a/libpod/storage.go
+++ b/libpod/storage.go
@@ -231,21 +231,21 @@ func (r *storageService) MountContainerImage(idOrName string) (string, error) {
return mountPoint, nil
}
-func (r *storageService) UnmountContainerImage(idOrName string) error {
+func (r *storageService) UnmountContainerImage(idOrName string) (bool, error) {
if idOrName == "" {
- return ErrEmptyID
+ return false, ErrEmptyID
}
container, err := r.store.Container(idOrName)
if err != nil {
- return err
+ return false, err
}
- err = r.store.Unmount(container.ID)
+ mounted, err := r.store.Unmount(container.ID, false)
if err != nil {
logrus.Debugf("failed to unmount container %q: %v", container.ID, err)
- return err
+ return false, err
}
logrus.Debugf("unmounted container %q", container.ID)
- return nil
+ return mounted, nil
}
func (r *storageService) GetWorkDir(id string) (string, error) {