From 94fd5fe6f70155052e3b540c25abf35b4b3dea4c Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Wed, 14 Aug 2024 12:00:45 +0200 Subject: [PATCH] libpod: remove duplicated HasVolume() check removeVolume() already does the same check so we do not need it twice. Signed-off-by: Paul Holzinger --- libpod/runtime_volume.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/libpod/runtime_volume.go b/libpod/runtime_volume.go index 6066145f02..ff04eec3cc 100644 --- a/libpod/runtime_volume.go +++ b/libpod/runtime_volume.go @@ -28,13 +28,6 @@ func (r *Runtime) RemoveVolume(ctx context.Context, v *Volume, force bool, timeo return define.ErrRuntimeStopped } - if !v.valid { - if ok, _ := r.state.HasVolume(v.Name()); !ok { - // Volume probably already removed - // Or was never in the runtime to begin with - return nil - } - } return r.removeVolume(ctx, v, force, timeout, false) }