diff --git a/volume/local/local.go b/volume/local/local.go index b154a36e7b..88a41afb51 100644 --- a/volume/local/local.go +++ b/volume/local/local.go @@ -117,9 +117,11 @@ type Root struct { // List lists all the volumes func (r *Root) List() ([]volume.Volume, error) { var ls []volume.Volume + r.m.Lock() for _, v := range r.volumes { ls = append(ls, v) } + r.m.Unlock() return ls, nil }