From 6235bd825b9951fae07afbd5c836a5c761dd7ec6 Mon Sep 17 00:00:00 2001 From: Klaus Post Date: Wed, 21 Apr 2021 17:39:00 +0200 Subject: [PATCH] Grab read lock while reading usage cache (#12111) Signed-off-by: Klaus Post --- cmd/data-usage-cache.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/data-usage-cache.go b/cmd/data-usage-cache.go index 2cfa4c79f..04dff0db3 100644 --- a/cmd/data-usage-cache.go +++ b/cmd/data-usage-cache.go @@ -528,7 +528,7 @@ type objectIO interface { // Only backend errors are returned as errors. // If the object is not found or unable to deserialize d is cleared and nil error is returned. func (d *dataUsageCache) load(ctx context.Context, store objectIO, name string) error { - r, err := store.GetObjectNInfo(ctx, dataUsageBucket, name, nil, http.Header{}, noLock, ObjectOptions{}) + r, err := store.GetObjectNInfo(ctx, dataUsageBucket, name, nil, http.Header{}, readLock, ObjectOptions{}) if err != nil { switch err.(type) { case ObjectNotFound: