Skip to content

Commit

Permalink
dm kcopyd: add gfp parm to alloc_pl
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mikulas Patocka authored and kergon committed May 29, 2011
1 parent 4cc1b4c commit f99b55e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/md/dm-kcopyd.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ static void wake(struct dm_kcopyd_client *kc)
queue_work(kc->kcopyd_wq, &kc->kcopyd_work);
}

static struct page_list *alloc_pl(void)
static struct page_list *alloc_pl(gfp_t gfp)
{
struct page_list *pl;

pl = kmalloc(sizeof(*pl), GFP_KERNEL);
pl = kmalloc(sizeof(*pl), gfp);
if (!pl)
return NULL;

pl->page = alloc_page(GFP_KERNEL);
pl->page = alloc_page(gfp);
if (!pl->page) {
kfree(pl);
return NULL;
Expand Down Expand Up @@ -143,7 +143,7 @@ static int client_alloc_pages(struct dm_kcopyd_client *kc, unsigned int nr)
struct page_list *pl = NULL, *next;

for (i = 0; i < nr; i++) {
next = alloc_pl();
next = alloc_pl(GFP_KERNEL);
if (!next) {
if (pl)
drop_pages(pl);
Expand Down

0 comments on commit f99b55e

Please sign in to comment.