From c7083531bf39bb6efd8e21405d6a7a97b325d3ee Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 5 Feb 2004 16:51:09 -0800 Subject: [PATCH] [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. --- drivers/scsi/sg.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index e48d1b05acfe6..6c210f52c5e0b 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c @@ -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); -- 2.53.0