Skip to content

Commit

Permalink
Merge pull request kubernetes#102088 from wzshiming/fix/pod-devices-h…
Browse files Browse the repository at this point in the history
…as-pod-lock

Add the missing RLock
  • Loading branch information
k8s-ci-robot authored May 24, 2021
2 parents 851d37e + bbed9d2 commit cf59c68
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/kubelet/cm/devicemanager/pod_devices.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit cf59c68

Please sign in to comment.