Commit c7083531 authored by Andrew Morton's avatar Andrew Morton Committed by Greg Kroah-Hartman

[PATCH] Suppress page allocation failures from sg_page_malloc()

It is performing higher-order atomic allocations then falling back, so
failures are expected.  Suppress the scary warnings.
parent 66bf0a37
......@@ -2532,13 +2532,18 @@ static char *
sg_page_malloc(int rqSz, int lowDma, int *retSzp)
{
char *resp = NULL;
int page_mask = lowDma ? (GFP_ATOMIC | GFP_DMA) : GFP_ATOMIC;
int page_mask;
int order, a_size;
int resSz = rqSz;
if (rqSz <= 0)
return resp;
if (lowDma)
page_mask = GFP_ATOMIC | GFP_DMA | __GFP_NOWARN;
else
page_mask = GFP_ATOMIC | __GFP_NOWARN;
for (order = 0, a_size = PAGE_SIZE; a_size < rqSz;
order++, a_size <<= 1) ;
resp = (char *) __get_free_pages(page_mask, order);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment