From f6edee0fe198aef28d60bdf887bc180acb0a8df5 Mon Sep 17 00:00:00 2001 From: Ted Yu Date: Sat, 1 Jun 2019 15:48:52 -0700 Subject: [PATCH] Use Mutex for synchronization in imageCache --- pkg/kubelet/images/image_gc_manager.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/kubelet/images/image_gc_manager.go b/pkg/kubelet/images/image_gc_manager.go index 4c6feabb17b..be6689943b3 100644 --- a/pkg/kubelet/images/image_gc_manager.go +++ b/pkg/kubelet/images/image_gc_manager.go @@ -107,8 +107,8 @@ type realImageGCManager struct { // imageCache caches latest result of ListImages. type imageCache struct { - // sync.RWMutex is the mutex protects the image cache. - sync.RWMutex + // sync.Mutex is the mutex protects the image cache. + sync.Mutex // images is the image cache. images []container.Image }