Remove double RLocks for GetBucketInfo (#6209)

master
Harshavardhana 6 years ago committed by kannappanr
parent 224a272cf2
commit dbd89bbae3
  1. 6
      cmd/bucket-handlers.go

@ -102,12 +102,6 @@ func (api objectAPIHandlers) GetBucketLocationHandler(w http.ResponseWriter, r *
return return
} }
bucketLock := globalNSMutex.NewNSLock(bucket, "")
if err := bucketLock.GetRLock(globalObjectTimeout); err != nil {
writeErrorResponse(w, toAPIErrorCode(err), r.URL)
return
}
defer bucketLock.RUnlock()
getBucketInfo := objectAPI.GetBucketInfo getBucketInfo := objectAPI.GetBucketInfo
if api.CacheAPI() != nil { if api.CacheAPI() != nil {
getBucketInfo = api.CacheAPI().GetBucketInfo getBucketInfo = api.CacheAPI().GetBucketInfo

Loading…
Cancel
Save