]> git.baikalelectronics.ru Git - kernel.git/commit
page_pool: fix logic in __page_pool_get_cached
authorJonathan Lemon <jonathan.lemon@gmail.com>
Tue, 13 Aug 2019 17:45:09 +0000 (10:45 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Aug 2019 19:27:36 +0000 (12:27 -0700)
commit9f4636161b4331eed51a47a2d7b40ef91a516587
treea19e6d1e6829a6106b80e66a2440960cc2a164fa
parent1c030753fef1a0b6634af8c621a51fd1a3b63bbc
page_pool: fix logic in __page_pool_get_cached

__page_pool_get_cached() will return NULL when the ring is
empty, even if there are pages present in the lookaside cache.

It is also possible to refill the cache, and then return a
NULL page.

Restructure the logic so eliminate both cases.

Signed-off-by: Jonathan Lemon <jonathan.lemon@gmail.com>
Acked-by: Jesper Dangaard Brouer <brouer@redhat.com>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/page_pool.c