From c635d0a092022a32d1661c24a1a7ba705a92cb01 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Wed, 24 Jan 2024 15:05:14 -0800 Subject: [PATCH] oci: fix error handling on submount calls Signed-off-by: Tonis Tiigi (cherry picked from commit 42d866ef3bcb333b21734acb861e3009449f4058) (cherry picked from commit e81066f8a8623dc876f3d64fae8f693c17ecdc1a) Signed-off-by: Andrey Epifanov --- executor/oci/spec.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/executor/oci/spec.go b/executor/oci/spec.go index 94b48a7aa9ff6..725a6aa23d4d8 100644 --- a/executor/oci/spec.go +++ b/executor/oci/spec.go @@ -213,12 +213,12 @@ func (s *submounts) subMount(m mount.Mount, subPath string) (mount.Mount, error) } h, err := hashstructure.Hash(m, hashstructure.FormatV2, nil) if err != nil { - return mount.Mount{}, nil + return mount.Mount{}, err } if mr, ok := s.m[h]; ok { sm, err := sub(mr.mount, subPath) if err != nil { - return mount.Mount{}, nil + return mount.Mount{}, err } return sm, nil }