s390/qeth: use memory reserves to back RX buffers
authorJulian Wiedmann <jwi@linux.ibm.com>
Wed, 18 Mar 2020 12:54:45 +0000 (13:54 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Mar 2020 23:33:35 +0000 (16:33 -0700)
Use dev_alloc_page() for backing the RX buffers with pages. This way we
pick up __GFP_MEMALLOC.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c

index 6caa78d51bd1b0004d966f6e021dd40c882a179b..be3f6295309b53e1b3b7d013abe0e1f53bf30d80 100644 (file)
@@ -244,7 +244,7 @@ static struct qeth_buffer_pool_entry *qeth_alloc_pool_entry(unsigned int pages)
                return NULL;
 
        for (i = 0; i < pages; i++) {
-               entry->elements[i] = alloc_page(GFP_KERNEL);
+               entry->elements[i] = __dev_alloc_page(GFP_KERNEL);
 
                if (!entry->elements[i]) {
                        qeth_free_pool_entry(entry);
@@ -2654,7 +2654,7 @@ static struct qeth_buffer_pool_entry *qeth_find_free_buffer_pool_entry(
                        struct qeth_buffer_pool_entry, list);
        for (i = 0; i < QETH_MAX_BUFFER_ELEMENTS(card); ++i) {
                if (page_count(entry->elements[i]) > 1) {
-                       struct page *page = alloc_page(GFP_ATOMIC);
+                       struct page *page = dev_alloc_page();
 
                        if (!page)
                                return NULL;