Lines Matching refs:reflck
560 mutex_lock(&vdev->reflck->lock);
579 mutex_unlock(&vdev->reflck->lock);
592 mutex_lock(&vdev->reflck->lock);
604 mutex_unlock(&vdev->reflck->lock);
1912 static void vfio_pci_reflck_put(struct vfio_pci_reflck *reflck);
2087 vfio_pci_reflck_put(vdev->reflck);
2107 vfio_pci_reflck_put(vdev->reflck);
2197 struct vfio_pci_reflck *reflck;
2199 reflck = kzalloc(sizeof(*reflck), GFP_KERNEL);
2200 if (!reflck)
2203 kref_init(&reflck->kref);
2204 mutex_init(&reflck->lock);
2206 return reflck;
2209 static void vfio_pci_reflck_get(struct vfio_pci_reflck *reflck)
2211 kref_get(&reflck->kref);
2231 if (vdev->reflck) {
2232 vfio_pci_reflck_get(vdev->reflck);
2233 *preflck = vdev->reflck;
2250 &vdev->reflck, slot) <= 0)
2251 vdev->reflck = vfio_pci_reflck_alloc();
2255 return PTR_ERR_OR_ZERO(vdev->reflck);
2260 struct vfio_pci_reflck *reflck = container_of(kref,
2264 kfree(reflck);
2268 static void vfio_pci_reflck_put(struct vfio_pci_reflck *reflck)
2270 kref_put_mutex(&reflck->kref, vfio_pci_reflck_release, &reflck_lock);
2343 * to hold vdev->reflck->lock, protecting the bus/slot reset group from