Commit f58f3c95 authored by Mina Almasry's avatar Mina Almasry Committed by Jakub Kicinski

net: remove napi_frag_unref

With the changes in the last patches, napi_frag_unref() is now
reduandant. Remove it and use skb_page_unref directly.
Signed-off-by: default avatarMina Almasry <almasrymina@google.com>
Reviewed-by: default avatarDragos Tatulea <dtatulea@nvidia.com>
Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Link: https://lore.kernel.org/r/20240408153000.2152844-4-almasrymina@google.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 959fa5c1
......@@ -3531,12 +3531,6 @@ skb_page_unref(struct page *page, bool recycle)
put_page(page);
}
static inline void
napi_frag_unref(skb_frag_t *frag, bool recycle)
{
skb_page_unref(skb_frag_page(frag), recycle);
}
/**
* __skb_frag_unref - release a reference on a paged fragment.
* @frag: the paged fragment
......@@ -3547,7 +3541,7 @@ napi_frag_unref(skb_frag_t *frag, bool recycle)
*/
static inline void __skb_frag_unref(skb_frag_t *frag, bool recycle)
{
napi_frag_unref(frag, recycle);
skb_page_unref(skb_frag_page(frag), recycle);
}
/**
......
......@@ -1101,7 +1101,7 @@ static void skb_release_data(struct sk_buff *skb, enum skb_drop_reason reason)
}
for (i = 0; i < shinfo->nr_frags; i++)
napi_frag_unref(&shinfo->frags[i], skb->pp_recycle);
__skb_frag_unref(&shinfo->frags[i], skb->pp_recycle);
free_head:
if (shinfo->frag_list)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment