]> git.ipfire.org Git - thirdparty/linux.git/commit
iommufd: Avoid duplicated __iommu_group_set_core_domain() call
authorYi Liu <yi.l.liu@intel.com>
Sun, 8 Sep 2024 11:42:55 +0000 (04:42 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Wed, 11 Sep 2024 23:14:07 +0000 (20:14 -0300)
commitd9dfb5e6225a0a99e08dc2a538b0c30a5a9a460c
tree2e0e332c5d74a34df9233993e19b81669e342224
parent8f6887349b2f829a4121c518aeb064fc922714e4
iommufd: Avoid duplicated __iommu_group_set_core_domain() call

For the fault-capable hwpts, the iommufd_hwpt_detach_device() calls both
iommufd_fault_domain_detach_dev() and iommu_detach_group(). This would have
duplicated __iommu_group_set_core_domain() call since both functions call
it in the end. This looks no harm as the __iommu_group_set_core_domain()
returns if the new domain equals to the existing one. But it makes sense to
avoid such duplicated calls in caller side.

Link: https://patch.msgid.link/r/20240908114256.979518-2-yi.l.liu@intel.com
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/iommufd_private.h