Remove double RLocks for GetBucketInfo (#6209)

This commit is contained in:
Harshavardhana 2018-07-30 17:38:52 -07:00 committed by kannappanr
parent 224a272cf2
commit dbd89bbae3

View File

@ -102,12 +102,6 @@ func (api objectAPIHandlers) GetBucketLocationHandler(w http.ResponseWriter, r *
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
if api.CacheAPI() != nil {
getBucketInfo = api.CacheAPI().GetBucketInfo