remove redundant mount/unmount calls on commit
@@ -23,11 +23,6 @@ func (daemon *Daemon) Commit(container *Container, repository, tag, comment, aut
defer container.Unpause()
}
- if err := container.Mount(); err != nil {
- return nil, err
- }
- defer container.Unmount()
-
rwTar, err := container.ExportRw()
if err != nil {
return nil, err
@@ -838,20 +838,15 @@ func (container *Container) verifyDaemonSettings() {
func (container *Container) ExportRw() (archive.Archive, error) {
if container.daemon == nil {
return nil, fmt.Errorf("Can't load storage driver for unregistered container %s", container.ID)
archive, err := container.daemon.Diff(container)
- container.Unmount()
return ioutils.NewReadCloserWrapper(archive, func() error {
err := archive.Close()
return err
}),
nil