summaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-kcopyd.c
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2011-05-29 13:03:04 +0100
committerAlasdair G Kergon <agk@redhat.com>2011-05-29 13:03:04 +0100
commitf99b55eec795bd0fd577ab3ca06f3acfbe3b1ab1 (patch)
treeb4e4b21bf5477895ac7f8b8b998847dd8c0686aa /drivers/md/dm-kcopyd.c
parent4cc1b4cffd187a5c5d6264c8d766c49b3c57fb05 (diff)
downloadlinux-f99b55eec795bd0fd577ab3ca06f3acfbe3b1ab1.tar.bz2
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>
Diffstat (limited to 'drivers/md/dm-kcopyd.c')
-rw-r--r--drivers/md/dm-kcopyd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/dm-kcopyd.c b/drivers/md/dm-kcopyd.c
index ed9577916399..0270844c2a3d 100644
--- a/drivers/md/dm-kcopyd.c
+++ b/drivers/md/dm-kcopyd.c
@@ -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;
@@ -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);