mirror of
https://github.com/containers/podman.git
synced 2025-05-21 00:56:36 +08:00
libpod: remove duplicated HasVolume() check
removeVolume() already does the same check so we do not need it twice. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
@ -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)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user