@@ -755,16 +755,16 @@ EXPORT_SYMBOL(page_pool_alloc_frag);
static void page_pool_empty_ring(struct page_pool *pool)
{
- struct page *page;
+ struct netmem *nmem;
/* Empty recycle ring */
- while ((page = ptr_ring_consume_bh(&pool->ring))) {
+ while ((nmem = ptr_ring_consume_bh(&pool->ring)) != NULL) {
/* Verify the refcnt invariant of cached pages */
- if (!(page_ref_count(page) == 1))
+ if (netmem_ref_count(nmem) != 1)
pr_crit("%s() page_pool refcnt %d violation\n",
- __func__, page_ref_count(page));
+ __func__, netmem_ref_count(nmem));
- page_pool_return_page(pool, page);
+ page_pool_return_netmem(pool, nmem);
}
}