mirror of
https://github.com/torvalds/linux.git
synced 2026-05-31 18:43:33 +02:00
net: make page_pool_ref_netmem work with net iovs
page_pool_ref_netmem() should work with either netmem representation, but
currently it casts to a page with netmem_to_page(), which will fail with
net iovs. Use netmem_get_pp_ref_count_ref() instead.
Fixes: 8ab79ed50c ("page_pool: devmem support")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: David Wei <dw@davidwei.uk>
Link: https://lore.kernel.org/20250108220644.3528845-2-dw@davidwei.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
6be7aca910
commit
cbc16bceea
|
|
@ -294,7 +294,7 @@ static inline long page_pool_unref_page(struct page *page, long nr)
|
|||
|
||||
static inline void page_pool_ref_netmem(netmem_ref netmem)
|
||||
{
|
||||
atomic_long_inc(&netmem_to_page(netmem)->pp_ref_count);
|
||||
atomic_long_inc(netmem_get_pp_ref_count_ref(netmem));
|
||||
}
|
||||
|
||||
static inline void page_pool_ref_page(struct page *page)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user