summaryrefslogtreecommitdiff
path: root/libpod/runtime_pod.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-02-22 13:46:52 -0500
committerGitHub <noreply@github.com>2022-02-22 13:46:52 -0500
commitd3903a85910979d8212028cf814574047015db58 (patch)
treef132003f65fee6e2178f96c8a289ee97a41dfe5b /libpod/runtime_pod.go
parentfab82a7c9ca3821c2b4496f9e9f6bfc8b2aff53d (diff)
parent4a60319ecb833fd4afd4ef32b3ca49c377a94b5c (diff)
downloadpodman-d3903a85910979d8212028cf814574047015db58.tar.gz
podman-d3903a85910979d8212028cf814574047015db58.tar.bz2
podman-d3903a85910979d8212028cf814574047015db58.zip
Merge pull request #13311 from mheon/remove_runtime_lock
Remove the runtime lock
Diffstat (limited to 'libpod/runtime_pod.go')
-rw-r--r--libpod/runtime_pod.go18
1 files changed, 0 insertions, 18 deletions
diff --git a/libpod/runtime_pod.go b/libpod/runtime_pod.go
index 11891630a..dca0ffc8a 100644
--- a/libpod/runtime_pod.go
+++ b/libpod/runtime_pod.go
@@ -27,9 +27,6 @@ type PodFilter func(*Pod) bool
// being removed
// Otherwise, the pod will not be removed if any containers are running
func (r *Runtime) RemovePod(ctx context.Context, p *Pod, removeCtrs, force bool, timeout *uint) error {
- r.lock.Lock()
- defer r.lock.Unlock()
-
if !r.valid {
return define.ErrRuntimeStopped
}
@@ -50,9 +47,6 @@ func (r *Runtime) RemovePod(ctx context.Context, p *Pod, removeCtrs, force bool,
// GetPod retrieves a pod by its ID
func (r *Runtime) GetPod(id string) (*Pod, error) {
- r.lock.RLock()
- defer r.lock.RUnlock()
-
if !r.valid {
return nil, define.ErrRuntimeStopped
}
@@ -62,9 +56,6 @@ func (r *Runtime) GetPod(id string) (*Pod, error) {
// HasPod checks to see if a pod with the given ID exists
func (r *Runtime) HasPod(id string) (bool, error) {
- r.lock.RLock()
- defer r.lock.RUnlock()
-
if !r.valid {
return false, define.ErrRuntimeStopped
}
@@ -75,9 +66,6 @@ func (r *Runtime) HasPod(id string) (bool, error) {
// LookupPod retrieves a pod by its name or a partial ID
// If a partial ID is not unique, an error will be returned
func (r *Runtime) LookupPod(idOrName string) (*Pod, error) {
- r.lock.RLock()
- defer r.lock.RUnlock()
-
if !r.valid {
return nil, define.ErrRuntimeStopped
}
@@ -111,9 +99,6 @@ func (r *Runtime) Pods(filters ...PodFilter) ([]*Pod, error) {
// GetAllPods retrieves all pods
func (r *Runtime) GetAllPods() ([]*Pod, error) {
- r.lock.RLock()
- defer r.lock.RUnlock()
-
if !r.valid {
return nil, define.ErrRuntimeStopped
}
@@ -148,9 +133,6 @@ func (r *Runtime) GetRunningPods() ([]*Pod, error) {
pods []string
runningPods []*Pod
)
- r.lock.RLock()
- defer r.lock.RUnlock()
-
if !r.valid {
return nil, define.ErrRuntimeStopped
}