net: hns3: do not reuse pfmemalloc pages
authorYunsheng Lin <linyunsheng@huawei.com>
Tue, 21 Jan 2020 08:42:06 +0000 (16:42 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jan 2020 10:46:20 +0000 (11:46 +0100)
commit08bb3857c6c2e2a62fe0cdc593af57215e9b95bc
treefea1a9cd6cf0cad04f6f81e0e51509621d1cc794
parent09783d448bccf1ec1c91d0b9e5443b0bcb034dbb
net: hns3: do not reuse pfmemalloc pages

HNS3 driver allocates pages for DMA with dev_alloc_pages(), which
calls alloc_pages_node() with the __GFP_MEMALLOC flag. So, in case
of OOM condition, HNS3 can get pages with pfmemalloc flag set.

So do not reuse the pages with pfmemalloc flag set because those
pages are reserved for special cases, such as low memory case.

Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c