Message ID | 55543BFA.9030606@ozlabs.ru (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Benjamin Herrenschmidt |
Headers | show |
--- a/arch/powerpc/mm/mmu_context_hash64_iommu.c +++ b/arch/powerpc/mm/mmu_context_hash64_iommu.c @@ -178,9 +178,9 @@ EXPORT_SYMBOL_GPL(mm_iommu_get); long mm_iommu_put(struct mm_iommu_table_group_mem_t *mem) { - if (1 != atomic_dec_if_positive(&mem->mapped)) { + if (atomic_dec_if_positive(&mem->mapped) > 1) { /* There are mappings, exit */ - atomic_inc(&mem->mapped); + atomic_inc_not_zero(&mem->mapped); return -EBUSY; }