Merge pull request #102088 from wzshiming/fix/pod-devices-has-pod-lock

Add the missing RLock
This commit is contained in:
Kubernetes Prow Robot 2021-05-24 15:16:20 -07:00 committed by GitHub
commit cf59c68e15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -65,6 +65,8 @@ func (pdev *podDevices) size() int {
}
func (pdev *podDevices) hasPod(podUID string) bool {
pdev.RLock()
defer pdev.RUnlock()
_, podExists := pdev.devs[podUID]
return podExists
}