RE: [PATCH v2 10/14] vfio-iommufd: Add detach_ioas for emulated VFIO devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Liu, Yi L <yi.l.liu@xxxxxxxxx>
> Sent: Monday, February 6, 2023 5:05 PM
> @@ -149,14 +149,18 @@ int vfio_iommufd_emulated_bind(struct
> vfio_device *vdev,
>  }
>  EXPORT_SYMBOL_GPL(vfio_iommufd_emulated_bind);
> 
> +static void __vfio_iommufd_access_destroy(struct vfio_device *vdev)
> +{
> +	iommufd_access_destroy(vdev->iommufd_access);
> +	vdev->iommufd_access = NULL;
> +}
> +
>  void vfio_iommufd_emulated_unbind(struct vfio_device *vdev)
>  {
>  	lockdep_assert_held(&vdev->dev_set->lock);
> 
> -	if (vdev->iommufd_access) {
> -		iommufd_access_destroy(vdev->iommufd_access);
> -		vdev->iommufd_access = NULL;
> -	}
> +	if (vdev->iommufd_access)
> +		__vfio_iommufd_access_destroy(vdev);

same comment as in last patch.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux