summaryrefslogtreecommitdiff
path: root/vendor/github.com
diff options
context:
space:
mode:
authorMatthew Heon <matthew.heon@gmail.com>2018-03-05 17:09:03 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-06 01:15:32 +0000
commitff9da1fb3f4122276cf9f78cf0ae4a4d461f78da (patch)
treec35b8b6676b0173cb16206b25d718e2a4cf1674c /vendor/github.com
parent649e4f07a3809b2522b593714780dbdfad06c771 (diff)
downloadpodman-ff9da1fb3f4122276cf9f78cf0ae4a4d461f78da.tar.gz
podman-ff9da1fb3f4122276cf9f78cf0ae4a4d461f78da.tar.bz2
podman-ff9da1fb3f4122276cf9f78cf0ae4a4d461f78da.zip
Update containers/storage to fix locking bug
Update to commit hash 1e5ce40cdb84ab66e26186435b1273e04b879fef Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #451 Approved by: rhatdan
Diffstat (limited to 'vendor/github.com')
-rw-r--r--vendor/github.com/containers/storage/store.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/vendor/github.com/containers/storage/store.go b/vendor/github.com/containers/storage/store.go
index de6054327..a31a08b2a 100644
--- a/vendor/github.com/containers/storage/store.go
+++ b/vendor/github.com/containers/storage/store.go
@@ -462,6 +462,12 @@ type store struct {
// GetStore attempts to find an already-created Store object matching the
// specified location and graph driver, and if it can't, it creates and
// initializes a new Store object, and the underlying storage that it controls.
+//
+// If StoreOptions `options` haven't been fully populated, then DefaultStoreOptions are used.
+//
+// These defaults observe environment variables:
+// * `STORAGE_DRIVER` for the name of the storage driver to attempt to use
+// * `STORAGE_OPTS` for the string of options to pass to the driver
func GetStore(options StoreOptions) (Store, error) {
if options.RunRoot == "" && options.GraphRoot == "" && options.GraphDriverName == "" && len(options.GraphDriverOptions) == 0 {
options = DefaultStoreOptions
@@ -2270,14 +2276,15 @@ func (s *store) Shutdown(force bool) ([]string, error) {
return mounted, err
}
+ s.graphLock.Lock()
+ defer s.graphLock.Unlock()
+
rlstore.Lock()
defer rlstore.Unlock()
if modified, err := rlstore.Modified(); modified || err != nil {
rlstore.Load()
}
- s.graphLock.Lock()
- defer s.graphLock.Unlock()
layers, err := rlstore.Layers()
if err != nil {
return mounted, err