@@ -322,8 +322,7 @@ static int ttm_page_pool_free(struct ttm_page_pool *pool, unsigned nr_free,
pr_err("Failed to allocate memory for pool free operation\n");
return 0;
}
-
-restart:
+ lock_restart:
spin_lock_irqsave(&pool->lock, irq_flags);
list_for_each_entry_reverse(p, &pool->list, lru) {
@@ -356,14 +355,13 @@ restart:
/* free all so restart the processing */
if (nr_free)
- goto restart;
+ goto lock_restart;
/* Not allowed to fall through or break because
* following context is inside spinlock while we are
* outside here.
*/
- goto out;
-
+ goto check_pages_to_free;
}
}
@@ -379,7 +377,7 @@ restart:
if (freed_pages)
ttm_pages_put(pages_to_free, freed_pages);
-out:
+ check_pages_to_free:
if (pages_to_free != static_buf)
kfree(pages_to_free);
return nr_free;