Skip to content

Commit

Permalink
iommu/vt-d: Only call domain_remove_one_dev_info to detach old domain
Browse files Browse the repository at this point in the history
There is no need to make a difference here between VM and
non-VM domains, so simplify this code here.

Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
joergroedel committed Aug 12, 2015
1 parent d160aca commit de7e888
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4648,10 +4648,7 @@ static int intel_iommu_attach_device(struct iommu_domain *domain,
old_domain = find_domain(dev);
if (old_domain) {
rcu_read_lock();
if (domain_type_is_vm_or_si(dmar_domain))
dmar_remove_one_dev_info(old_domain, dev);
else
domain_remove_dev_info(old_domain);
dmar_remove_one_dev_info(old_domain, dev);
rcu_read_unlock();

if (!domain_type_is_vm_or_si(old_domain) &&
Expand Down

0 comments on commit de7e888

Please sign in to comment.