iommu/vt-d: Use device_domain_lock accurately
authorLu Baolu <baolu.lu@linux.intel.com>
Tue, 12 Jul 2022 00:09:01 +0000 (08:09 +0800)
committerJoerg Roedel <jroedel@suse.de>
Fri, 15 Jul 2022 08:21:39 +0000 (10:21 +0200)
commit969aaefbaaf2b444852c1980ac0cbbb66463fdae
treef10329c9759d8d130e5e2a28ebeddc112562f3a3
parentdb75c9573b08e28109cf7b4ceb62b5f11154742e
iommu/vt-d: Use device_domain_lock accurately

The device_domain_lock is used to protect the device tracking list of
a domain. Remove unnecessary spin_lock/unlock()'s and move the necessary
ones around the list access.

Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Link: https://lore.kernel.org/r/20220706025524.2904370-11-baolu.lu@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel/iommu.c