aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/page_pool.c
diff options
context:
space:
mode:
authorJakub Kicinski <[email protected]>2024-12-15 21:29:38 +0000
committerJakub Kicinski <[email protected]>2024-12-18 01:45:17 +0000
commitd3c9510dc900e9ff3ea330189c0465c9f00fba18 (patch)
treeb94a7185d3229189c1bc99ceb8c97578fe5a2ea7 /net/core/page_pool.c
parentrust: net::phy scope ThisModule usage in the module_phy_driver macro (diff)
downloadkernel-d3c9510dc900e9ff3ea330189c0465c9f00fba18.tar.gz
kernel-d3c9510dc900e9ff3ea330189c0465c9f00fba18.zip
net: page_pool: rename page_pool_is_last_ref()
page_pool_is_last_ref() releases a reference while the name, to me at least, suggests it just checks if the refcount is 1. The semantics of the function are the same as those of atomic_dec_and_test() and refcount_dec_and_test(), so just use the _and_test() suffix. Reviewed-by: Alexander Lobakin <[email protected]> Reviewed-by: Ilias Apalodimas <[email protected]> Acked-by: Jesper Dangaard Brouer <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/core/page_pool.c')
-rw-r--r--net/core/page_pool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index e07ad7315955..9733206d6406 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -897,7 +897,7 @@ void page_pool_put_netmem_bulk(netmem_ref *data, u32 count)
for (u32 i = 0; i < count; i++) {
netmem_ref netmem = netmem_compound_head(data[i]);
- if (page_pool_is_last_ref(netmem))
+ if (page_pool_unref_and_test(netmem))
data[bulk_len++] = netmem;
}