iommufd: Consistently manage hwpt_item
authorJason Gunthorpe <jgg@nvidia.com>
Wed, 1 Mar 2023 19:30:20 +0000 (15:30 -0400)
committerJason Gunthorpe <jgg@nvidia.com>
Mon, 6 Mar 2023 14:51:57 +0000 (10:51 -0400)
commit342b9cab8e0cb6d35821ded00769a1172d171771
tree42c068bd9373f0c64bdd9004f1b5e1f9df240f8a
parent7214c1c85fe464929e9c32f90f81d65cd44b8ff6
iommufd: Consistently manage hwpt_item

This should be added immediately after every iopt_table_add_domain(), and
deleted after every iopt_table_remove_domain() under the ioas->mutex.

Tidy things to be consistent.

Link: https://lore.kernel.org/r/3-v3-ae9c2975a131+2e1e8-iommufd_hwpt_jgg@nvidia.com
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/iommu/iommufd/device.c