Merge pull request #13536 from Mic92/master

remove redundant mount/unmount calls on commit
This commit is contained in:
Jessie Frazelle 2015-06-01 15:57:14 -07:00
commit 1f472c3768
2 changed files with 0 additions and 10 deletions

View file

@ -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

View file

@ -838,20 +838,15 @@ func (container *Container) verifyDaemonSettings() {
}
func (container *Container) ExportRw() (archive.Archive, error) {
if err := container.Mount(); err != nil {
return nil, err
}
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)
if err != nil {
container.Unmount()
return nil, err
}
return ioutils.NewReadCloserWrapper(archive, func() error {
err := archive.Close()
container.Unmount()
return err
}),
nil