diff --git a/cmd/bucket-quota.go b/cmd/bucket-quota.go index e2555b790..99317a036 100644 --- a/cmd/bucket-quota.go +++ b/cmd/bucket-quota.go @@ -89,7 +89,10 @@ func (sys *BucketQuotaSys) check(ctx context.Context, bucket string, size int64) return err } - dui := v.(madmin.DataUsageInfo) + dui, ok := v.(DataUsageInfo) + if !ok { + return fmt.Errorf("internal error: Unexpected DUI data type: %T", v) + } bui, ok := dui.BucketsUsage[bucket] if !ok {