OSDN Git Service

iommu: Use __iommu_group_set_domain() in iommu_change_dev_def_domain()
authorJason Gunthorpe <jgg@nvidia.com>
Thu, 11 May 2023 04:42:03 +0000 (01:42 -0300)
committerJoerg Roedel <jroedel@suse.de>
Tue, 23 May 2023 06:15:52 +0000 (08:15 +0200)
commit4c8ad9da05662141928fe4ed001d3775fd95221c
treeb66600c2cddc195e47b98ce63553d0da9f93f798
parentecd60dc5d22b2ac2a68d9bf84bed0cf96b654cde
iommu: Use __iommu_group_set_domain() in iommu_change_dev_def_domain()

This is missing re-attach error handling if the attach fails, use the
common code.

The ugly "group->domain = prev_domain" will be cleaned in a later patch.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/5-v5-1b99ae392328+44574-iommu_err_unwind_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c