Browse Source

Merge pull request #13536 from Mic92/master

remove redundant mount/unmount calls on commit
Jessie Frazelle 10 years ago
parent
commit
1f472c3768
2 changed files with 0 additions and 10 deletions
  1. 0 5
      daemon/commit.go
  2. 0 5
      daemon/container_linux.go

+ 0 - 5
daemon/commit.go

@@ -23,11 +23,6 @@ func (daemon *Daemon) Commit(container *Container, repository, tag, comment, aut
 		defer container.Unpause()
 		defer container.Unpause()
 	}
 	}
 
 
-	if err := container.Mount(); err != nil {
-		return nil, err
-	}
-	defer container.Unmount()
-
 	rwTar, err := container.ExportRw()
 	rwTar, err := container.ExportRw()
 	if err != nil {
 	if err != nil {
 		return nil, err
 		return nil, err

+ 0 - 5
daemon/container_linux.go

@@ -838,20 +838,15 @@ func (container *Container) verifyDaemonSettings() {
 }
 }
 
 
 func (container *Container) ExportRw() (archive.Archive, error) {
 func (container *Container) ExportRw() (archive.Archive, error) {
-	if err := container.Mount(); err != nil {
-		return nil, err
-	}
 	if container.daemon == nil {
 	if container.daemon == nil {
 		return nil, fmt.Errorf("Can't load storage driver for unregistered container %s", container.ID)
 		return nil, fmt.Errorf("Can't load storage driver for unregistered container %s", container.ID)
 	}
 	}
 	archive, err := container.daemon.Diff(container)
 	archive, err := container.daemon.Diff(container)
 	if err != nil {
 	if err != nil {
-		container.Unmount()
 		return nil, err
 		return nil, err
 	}
 	}
 	return ioutils.NewReadCloserWrapper(archive, func() error {
 	return ioutils.NewReadCloserWrapper(archive, func() error {
 			err := archive.Close()
 			err := archive.Close()
-			container.Unmount()
 			return err
 			return err
 		}),
 		}),
 		nil
 		nil