Lines Matching full:pl

317 	struct page_list *pl;  in alloc_pl()  local
319 pl = kmalloc(sizeof(*pl), gfp); in alloc_pl()
320 if (!pl) in alloc_pl()
324 kcopyd_rsm_get_page(&pl->page); in alloc_pl()
326 pl->page = alloc_page(gfp); in alloc_pl()
329 if (!pl->page) { in alloc_pl()
330 kfree(pl); in alloc_pl()
334 return pl; in alloc_pl()
337 static void free_pl(struct page_list *pl) in free_pl() argument
339 struct page *p = pl->page; in free_pl()
343 kcopyd_rsm_drop_page(&pl->page); in free_pl()
345 __free_page(pl->page); in free_pl()
347 kfree(pl); in free_pl()
354 static void kcopyd_put_pages(struct dm_kcopyd_client *kc, struct page_list *pl) in kcopyd_put_pages() argument
359 next = pl->next; in kcopyd_put_pages()
362 free_pl(pl); in kcopyd_put_pages()
364 pl->next = kc->pages; in kcopyd_put_pages()
365 kc->pages = pl; in kcopyd_put_pages()
369 pl = next; in kcopyd_put_pages()
370 } while (pl); in kcopyd_put_pages()
377 struct page_list *pl; in kcopyd_get_pages() local
382 pl = alloc_pl(__GFP_NOWARN | __GFP_NORETRY | __GFP_KSWAPD_RECLAIM, job_flags); in kcopyd_get_pages()
383 if (unlikely(!pl)) { in kcopyd_get_pages()
385 pl = kc->pages; in kcopyd_get_pages()
386 if (unlikely(!pl)) in kcopyd_get_pages()
388 kc->pages = pl->next; in kcopyd_get_pages()
391 pl->next = *pages; in kcopyd_get_pages()
392 *pages = pl; in kcopyd_get_pages()
406 static void drop_pages(struct page_list *pl) in drop_pages() argument
410 while (pl) { in drop_pages()
411 next = pl->next; in drop_pages()
412 free_pl(pl); in drop_pages()
413 pl = next; in drop_pages()
423 struct page_list *pl = NULL, *next; in client_reserve_pages() local
428 if (pl) in client_reserve_pages()
429 drop_pages(pl); in client_reserve_pages()
432 next->next = pl; in client_reserve_pages()
433 pl = next; in client_reserve_pages()
437 kcopyd_put_pages(kc, pl); in client_reserve_pages()
674 .mem.ptr.pl = job->pages, in run_io_job()