From ff9da1fb3f4122276cf9f78cf0ae4a4d461f78da Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Mon, 5 Mar 2018 17:09:03 -0500 Subject: Update containers/storage to fix locking bug Update to commit hash 1e5ce40cdb84ab66e26186435b1273e04b879fef Signed-off-by: Matthew Heon Closes: #451 Approved by: rhatdan --- vendor/github.com/containers/storage/store.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'vendor') 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 -- cgit v1.2.3-54-g00ecf