mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
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>
This commit is contained in:
parent
4cc1b4cffd
commit
f99b55eec7
1 changed files with 4 additions and 4 deletions
|
@ -70,15 +70,15 @@ static void wake(struct dm_kcopyd_client *kc)
|
||||||
queue_work(kc->kcopyd_wq, &kc->kcopyd_work);
|
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;
|
struct page_list *pl;
|
||||||
|
|
||||||
pl = kmalloc(sizeof(*pl), GFP_KERNEL);
|
pl = kmalloc(sizeof(*pl), gfp);
|
||||||
if (!pl)
|
if (!pl)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
pl->page = alloc_page(GFP_KERNEL);
|
pl->page = alloc_page(gfp);
|
||||||
if (!pl->page) {
|
if (!pl->page) {
|
||||||
kfree(pl);
|
kfree(pl);
|
||||||
return NULL;
|
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;
|
struct page_list *pl = NULL, *next;
|
||||||
|
|
||||||
for (i = 0; i < nr; i++) {
|
for (i = 0; i < nr; i++) {
|
||||||
next = alloc_pl();
|
next = alloc_pl(GFP_KERNEL);
|
||||||
if (!next) {
|
if (!next) {
|
||||||
if (pl)
|
if (pl)
|
||||||
drop_pages(pl);
|
drop_pages(pl);
|
||||||
|
|
Loading…
Reference in a new issue