From f2c42a3958d12b45375aeb2384a3a8a103203c1c Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 31 Mar 2020 10:20:05 -0700 Subject: pkg/spec.InitFSMounts: fix mount opts in place ... rather than create a new slice and then make the caller replace the original with the new one. Signed-off-by: Kir Kolyshkin --- pkg/specgen/oci.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'pkg/specgen') diff --git a/pkg/specgen/oci.go b/pkg/specgen/oci.go index 2523f21b3..db60dc25e 100644 --- a/pkg/specgen/oci.go +++ b/pkg/specgen/oci.go @@ -215,11 +215,9 @@ func (s *SpecGenerator) toOCISpec(rt *libpod.Runtime, newImage *image.Image) (*s // BIND MOUNTS configSpec.Mounts = createconfig.SupercedeUserMounts(s.Mounts, configSpec.Mounts) // Process mounts to ensure correct options - finalMounts, err := createconfig.InitFSMounts(configSpec.Mounts) - if err != nil { + if err := createconfig.InitFSMounts(configSpec.Mounts); err != nil { return nil, err } - configSpec.Mounts = finalMounts // Add annotations if configSpec.Annotations == nil { -- cgit v1.2.3-54-g00ecf