vfio: Remove vfio_free_device
With the "mess" sorted out, we should be able to inline the
vfio_free_device call introduced by commit cb9ff3f3b8
("vfio: Add helpers for unifying vfio_device life cycle")
and remove them from driver release callbacks.
Signed-off-by: Eric Farman <farman@linux.ibm.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Reviewed-by: Tony Krowiak <akrowiak@linux.ibm.com> # vfio-ap part
Reviewed-by: Matthew Rosato <mjrosato@linux.ibm.com>
Link: https://lore.kernel.org/r/20221104142007.1314999-8-farman@linux.ibm.com
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
This commit is contained in:
committed by
Alex Williamson
parent
d1104f9327
commit
913447d06f
@@ -594,7 +594,6 @@ static void mbochs_release_dev(struct vfio_device *vdev)
|
||||
atomic_add(mdev_state->type->mbytes, &mbochs_avail_mbytes);
|
||||
kfree(mdev_state->pages);
|
||||
kfree(mdev_state->vconfig);
|
||||
vfio_free_device(vdev);
|
||||
}
|
||||
|
||||
static void mbochs_remove(struct mdev_device *mdev)
|
||||
|
||||
@@ -283,7 +283,6 @@ static void mdpy_release_dev(struct vfio_device *vdev)
|
||||
|
||||
vfree(mdev_state->memblk);
|
||||
kfree(mdev_state->vconfig);
|
||||
vfio_free_device(vdev);
|
||||
}
|
||||
|
||||
static void mdpy_remove(struct mdev_device *mdev)
|
||||
|
||||
@@ -784,7 +784,6 @@ static void mtty_release_dev(struct vfio_device *vdev)
|
||||
|
||||
atomic_add(mdev_state->nr_ports, &mdev_avail_ports);
|
||||
kfree(mdev_state->vconfig);
|
||||
vfio_free_device(vdev);
|
||||
}
|
||||
|
||||
static void mtty_remove(struct mdev_device *mdev)
|
||||
|
||||
Reference in New Issue
Block a user