Lines Matching full:pl
216 struct page_list *pl; in alloc_pl() local
218 pl = kmalloc(sizeof(*pl), gfp); in alloc_pl()
219 if (!pl) in alloc_pl()
222 pl->page = alloc_page(gfp); in alloc_pl()
223 if (!pl->page) { in alloc_pl()
224 kfree(pl); in alloc_pl()
228 return pl; in alloc_pl()
231 static void free_pl(struct page_list *pl) in free_pl() argument
233 __free_page(pl->page); in free_pl()
234 kfree(pl); in free_pl()
241 static void kcopyd_put_pages(struct dm_kcopyd_client *kc, struct page_list *pl) in kcopyd_put_pages() argument
246 next = pl->next; in kcopyd_put_pages()
249 free_pl(pl); in kcopyd_put_pages()
251 pl->next = kc->pages; in kcopyd_put_pages()
252 kc->pages = pl; in kcopyd_put_pages()
256 pl = next; in kcopyd_put_pages()
257 } while (pl); in kcopyd_put_pages()
263 struct page_list *pl; in kcopyd_get_pages() local
268 pl = alloc_pl(__GFP_NOWARN | __GFP_NORETRY | __GFP_KSWAPD_RECLAIM); in kcopyd_get_pages()
269 if (unlikely(!pl)) { in kcopyd_get_pages()
271 pl = kc->pages; in kcopyd_get_pages()
272 if (unlikely(!pl)) in kcopyd_get_pages()
274 kc->pages = pl->next; in kcopyd_get_pages()
277 pl->next = *pages; in kcopyd_get_pages()
278 *pages = pl; in kcopyd_get_pages()
292 static void drop_pages(struct page_list *pl) in drop_pages() argument
296 while (pl) { in drop_pages()
297 next = pl->next; in drop_pages()
298 free_pl(pl); in drop_pages()
299 pl = next; in drop_pages()
309 struct page_list *pl = NULL, *next; in client_reserve_pages() local
314 if (pl) in client_reserve_pages()
315 drop_pages(pl); in client_reserve_pages()
318 next->next = pl; in client_reserve_pages()
319 pl = next; in client_reserve_pages()
323 kcopyd_put_pages(kc, pl); in client_reserve_pages()
557 .mem.ptr.pl = job->pages, in run_io_job()