Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm kcopyd: add gfp parm to alloc_pl

Introduce a parameter for gfp flags to alloc_pl() for use in following
patches.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>

authored by

Mikulas Patocka and committed by
Alasdair G Kergon
f99b55ee 4cc1b4cf

+4 -4
+4 -4
drivers/md/dm-kcopyd.c
··· 70 70 queue_work(kc->kcopyd_wq, &kc->kcopyd_work); 71 71 } 72 72 73 - static struct page_list *alloc_pl(void) 73 + static struct page_list *alloc_pl(gfp_t gfp) 74 74 { 75 75 struct page_list *pl; 76 76 77 - pl = kmalloc(sizeof(*pl), GFP_KERNEL); 77 + pl = kmalloc(sizeof(*pl), gfp); 78 78 if (!pl) 79 79 return NULL; 80 80 81 - pl->page = alloc_page(GFP_KERNEL); 81 + pl->page = alloc_page(gfp); 82 82 if (!pl->page) { 83 83 kfree(pl); 84 84 return NULL; ··· 143 143 struct page_list *pl = NULL, *next; 144 144 145 145 for (i = 0; i < nr; i++) { 146 - next = alloc_pl(); 146 + next = alloc_pl(GFP_KERNEL); 147 147 if (!next) { 148 148 if (pl) 149 149 drop_pages(pl);