From 414c3104ca63eed5a28deb02103d30e65677b29a Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Tue, 10 Oct 2017 17:52:55 -0400 Subject: [PATCH] Make sure we use rwlocks not just RLock --- .../volume/attachdetach/cache/desired_state_of_world.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/controller/volume/attachdetach/cache/desired_state_of_world.go b/pkg/controller/volume/attachdetach/cache/desired_state_of_world.go index affd6229a72..57ee9253ec1 100644 --- a/pkg/controller/volume/attachdetach/cache/desired_state_of_world.go +++ b/pkg/controller/volume/attachdetach/cache/desired_state_of_world.go @@ -336,8 +336,8 @@ func (dsw *desiredStateOfWorld) VolumeExists( func (dsw *desiredStateOfWorld) SetMultiAttachError( volumeName v1.UniqueVolumeName, nodeName k8stypes.NodeName) { - dsw.RLock() - defer dsw.RUnlock() + dsw.Lock() + defer dsw.Unlock() nodeObj, nodeExists := dsw.nodesManaged[nodeName] if nodeExists {