diff options
author | Kir Kolyshkin <kolyshkin@gmail.com> | 2020-03-31 10:20:05 -0700 |
---|---|---|
committer | Kir Kolyshkin <kolyshkin@gmail.com> | 2020-04-01 15:30:59 -0700 |
commit | f2c42a3958d12b45375aeb2384a3a8a103203c1c (patch) | |
tree | 9f6f9c1d4456145de6965f2a73ff3d47f6093908 /pkg/specgen | |
parent | c11c5e180a6e00e0093f51b050962ee1e2e30f7a (diff) | |
download | podman-f2c42a3958d12b45375aeb2384a3a8a103203c1c.tar.gz podman-f2c42a3958d12b45375aeb2384a3a8a103203c1c.tar.bz2 podman-f2c42a3958d12b45375aeb2384a3a8a103203c1c.zip |
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 <kolyshkin@gmail.com>
Diffstat (limited to 'pkg/specgen')
-rw-r--r-- | pkg/specgen/oci.go | 4 |
1 files changed, 1 insertions, 3 deletions
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 { |