code: func (i *ImageService) ReleaseLayer(rwlayer layer.RWLayer, containerOS string) error {
  	metadata, err := i.layerStores[containerOS].ReleaseRWLayer(rwlayer)
  	layer.LogReleaseMetadata(metadata)
  	if err != nil && err != layer.ErrMountDoesNotExist && !os.IsNotExist(errors.Cause(err)) {
  		return errors.Wrapf(err, "driver %q failed to remove root filesystem",
  			i.layerStores[containerOS].DriverName())
  	}
  	return nil
  }
docs: // ReleaseLayer releases a layer allowing it to be removed
  // called from delete.go Daemon.cleanupContainer(), and Daemon.containerExport()