diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2022-02-22 13:46:52 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-22 13:46:52 -0500 |
commit | d3903a85910979d8212028cf814574047015db58 (patch) | |
tree | f132003f65fee6e2178f96c8a289ee97a41dfe5b /libpod/runtime_cstorage.go | |
parent | fab82a7c9ca3821c2b4496f9e9f6bfc8b2aff53d (diff) | |
parent | 4a60319ecb833fd4afd4ef32b3ca49c377a94b5c (diff) | |
download | podman-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_cstorage.go')
-rw-r--r-- | libpod/runtime_cstorage.go | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/libpod/runtime_cstorage.go b/libpod/runtime_cstorage.go index 026cab3c5..1c528e1b8 100644 --- a/libpod/runtime_cstorage.go +++ b/libpod/runtime_cstorage.go @@ -21,9 +21,6 @@ type StorageContainer struct { // ListStorageContainers lists all containers visible to c/storage. func (r *Runtime) ListStorageContainers() ([]*StorageContainer, error) { - r.lock.RLock() - defer r.lock.RUnlock() - finalCtrs := []*StorageContainer{} ctrs, err := r.store.Containers() @@ -61,15 +58,6 @@ func (r *Runtime) StorageContainer(idOrName string) (*storage.Container, error) // Accepts ID or full name of container. // If force is set, the container will be unmounted first to ensure removal. func (r *Runtime) RemoveStorageContainer(idOrName string, force bool) error { - r.lock.Lock() - defer r.lock.Unlock() - - return r.removeStorageContainer(idOrName, force) -} - -// Internal function to remove the container storage without -// locking the runtime. -func (r *Runtime) removeStorageContainer(idOrName string, force bool) error { targetID, err := r.store.Lookup(idOrName) if err != nil { if errors.Cause(err) == storage.ErrLayerUnknown { |