ImageService.ReleaseLayer(): remove unused containerOS argument

This looks to be a leftover from LCOW.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2022-01-25 12:34:32 +01:00
parent e30a4a438b
commit cae1dbee01
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
3 changed files with 4 additions and 4 deletions

View file

@ -116,7 +116,7 @@ func (daemon *Daemon) cleanupContainer(container *container.Container, forceRemo
// When container creation fails and `RWLayer` has not been created yet, we
// do not call `ReleaseRWLayer`
if container.RWLayer != nil {
err := daemon.imageService.ReleaseLayer(container.RWLayer, container.OS)
err := daemon.imageService.ReleaseLayer(container.RWLayer)
if err != nil {
err = errors.Wrapf(err, "container %s", container.ID)
container.SetRemovalError(err)

View file

@ -52,7 +52,7 @@ func (daemon *Daemon) containerExport(container *container.Container) (arch io.R
}
defer func() {
if err != nil {
daemon.imageService.ReleaseLayer(rwlayer, container.OS)
daemon.imageService.ReleaseLayer(rwlayer)
}
}()
@ -73,7 +73,7 @@ func (daemon *Daemon) containerExport(container *container.Container) (arch io.R
arch = ioutils.NewReadCloserWrapper(archv, func() error {
err := archv.Close()
rwlayer.Unmount()
daemon.imageService.ReleaseLayer(rwlayer, container.OS)
daemon.imageService.ReleaseLayer(rwlayer)
return err
})
daemon.LogContainerEvent(container, "export")

View file

@ -187,7 +187,7 @@ func (i *ImageService) GraphDriverName() string {
// ReleaseLayer releases a layer allowing it to be removed
// called from delete.go Daemon.cleanupContainer(), and Daemon.containerExport()
func (i *ImageService) ReleaseLayer(rwlayer layer.RWLayer, containerOS string) error {
func (i *ImageService) ReleaseLayer(rwlayer layer.RWLayer) error {
metadata, err := i.layerStore.ReleaseRWLayer(rwlayer)
layer.LogReleaseMetadata(metadata)
if err != nil && !errors.Is(err, layer.ErrMountDoesNotExist) && !errors.Is(err, os.ErrNotExist) {