mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 08:17:26 +00:00
Add the missing RLock
This commit is contained in:
parent
2d58b72889
commit
bbed9d27b0
@ -65,6 +65,8 @@ func (pdev *podDevices) size() int {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (pdev *podDevices) hasPod(podUID string) bool {
|
func (pdev *podDevices) hasPod(podUID string) bool {
|
||||||
|
pdev.RLock()
|
||||||
|
defer pdev.RUnlock()
|
||||||
_, podExists := pdev.devs[podUID]
|
_, podExists := pdev.devs[podUID]
|
||||||
return podExists
|
return podExists
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user