summaryrefslogtreecommitdiff
path: root/libpod/runtime_volume.go
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@pm.me>2019-08-27 13:45:11 -0400
committerMatthew Heon <matthew.heon@pm.me>2019-08-28 11:35:00 -0400
commite563f4111600a6c5506e4953bf796783a097544f (patch)
tree54cae975be3d0de2805d15d3305d74ef798ce799 /libpod/runtime_volume.go
parentf221c6101934fccbd6705f3b387aadc9ae710f66 (diff)
downloadpodman-e563f4111600a6c5506e4953bf796783a097544f.tar.gz
podman-e563f4111600a6c5506e4953bf796783a097544f.tar.bz2
podman-e563f4111600a6c5506e4953bf796783a097544f.zip
Re-add locks to volumes.
This will require a 'podman system renumber' after being applied to get lock numbers for existing volumes. Add the DB backend code for rewriting volume configs and use it for updating lock numbers as part of 'system renumber'. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
Diffstat (limited to 'libpod/runtime_volume.go')
-rw-r--r--libpod/runtime_volume.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/runtime_volume.go b/libpod/runtime_volume.go
index d05db936b..512e778a1 100644
--- a/libpod/runtime_volume.go
+++ b/libpod/runtime_volume.go
@@ -36,6 +36,10 @@ func (r *Runtime) RemoveVolume(ctx context.Context, v *Volume, force bool) error
return nil
}
}
+
+ v.lock.Lock()
+ defer v.lock.Unlock()
+
return r.removeVolume(ctx, v, force)
}