Skip to content

Commit

Permalink
s390/qeth: use memory reserves to back RX buffers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Julian Wiedmann authored and David S. Miller committed Mar 18, 2020
1 parent a58741e commit 714c910
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/s390/net/qeth_core_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 714c910

Please sign in to comment.