aboutsummaryrefslogtreecommitdiff
path: root/weed/storage/disk_location.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/storage/disk_location.go')
-rw-r--r--weed/storage/disk_location.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/storage/disk_location.go b/weed/storage/disk_location.go
index c309b3f92..9ecc57459 100644
--- a/weed/storage/disk_location.go
+++ b/weed/storage/disk_location.go
@@ -174,6 +174,9 @@ func (l *DiskLocation) DeleteCollectionFromDiskLocation(collection string) (e er
}
func (l *DiskLocation) deleteVolumeById(vid needle.VolumeId) (found bool, e error) {
+ l.volumesLock.Lock()
+ defer l.volumesLock.Unlock()
+
v, ok := l.volumes[vid]
if !ok {
return