On Fri, 12 Mar 2021 20:56:05 -0400 Jason Gunthorpe <jgg@xxxxxxxxxx> wrote: > This tidies a few confused places that think they can have a refcount on > the vfio_device but the device_data could be NULL, that isn't possible by > design. > > Most of the change falls out when struct vfio_devices is updated to just > store the struct vfio_pci_device itself. This wasn't possible before > because there was no easy way to get from the 'struct vfio_pci_device' to > the 'struct vfio_device' to put back the refcount. > > Reviewed-by: Christoph Hellwig <hch@xxxxxx> > Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx> > --- > drivers/vfio/pci/vfio_pci.c | 67 +++++++++++++------------------------ > 1 file changed, 24 insertions(+), 43 deletions(-) Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>