mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-22 12:29:49 +00:00
virtcontainers: fix nydus cleanup on rootfs unmount
This was discovered by @sprt in https://github.com/kata-containers/kata-containers/pull/10243#discussion_r2373709407. Checking for state.Fstype makes no sense as we know it is empty. Signed-off-by: Paul Meyer <katexochen0@gmail.com>
This commit is contained in:
committed by
Fabiano Fidêncio
parent
10f8ec0c20
commit
06ed957a45
@@ -184,7 +184,7 @@ func bindUnmountAllRootfs(ctx context.Context, sharedDir string, sandbox *Sandbo
|
||||
if c.state.Fstype == "" {
|
||||
// even if error found, don't break out of loop until all mounts attempted
|
||||
// to be unmounted, and collect all errors
|
||||
if IsNydusRootFSType(c.state.Fstype) {
|
||||
if IsNydusRootFSType(c.rootFs.Type) {
|
||||
errors = merr.Append(errors, nydusContainerCleanup(ctx, sharedDir, c))
|
||||
} else {
|
||||
errors = merr.Append(errors, bindUnmountContainerRootfs(ctx, sharedDir, c.id))
|
||||
|
Reference in New Issue
Block a user