From 5aed635d2037f5515f4617e2462f560c5c7fb6ab Mon Sep 17 00:00:00 2001 From: Yahor Yuzefovich Date: Wed, 29 Mar 2023 00:24:01 +0000 Subject: [PATCH] util/mon: remove redundant locking in NewMonitorInheritWithLimit This locking is no longer needed as of 472e7401214d2fa1918507ca5c8ee6fbb7a7856b. Release note: None --- pkg/util/mon/bytes_usage.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/util/mon/bytes_usage.go b/pkg/util/mon/bytes_usage.go index d8f6944a7dd7..0122a0b1d601 100644 --- a/pkg/util/mon/bytes_usage.go +++ b/pkg/util/mon/bytes_usage.go @@ -436,8 +436,6 @@ func NewMonitorWithLimit( func NewMonitorInheritWithLimit( name redact.RedactableString, limit int64, m *BytesMonitor, ) *BytesMonitor { - m.mu.Lock() - defer m.mu.Unlock() return NewMonitorWithLimit( name, m.resource,