mm, vmalloc: change iterating a vmlist to find_vm_area()
[platform/adaptation/renesas_rcar/renesas_kernel.git] / arch / tile / mm / pgtable.c
index b3b4972..dfd63ce 100644 (file)
@@ -592,12 +592,7 @@ void iounmap(volatile void __iomem *addr_in)
           in parallel. Reuse of the virtual address is prevented by
           leaving it in the global lists until we're done with it.
           cpa takes care of the direct mappings. */
-       read_lock(&vmlist_lock);
-       for (p = vmlist; p; p = p->next) {
-               if (p->addr == addr)
-                       break;
-       }
-       read_unlock(&vmlist_lock);
+       p = find_vm_area((void *)addr);
 
        if (!p) {
                pr_err("iounmap: bad address %p\n", addr);