summaryrefslogtreecommitdiff
path: root/net/core
diff options
context:
space:
mode:
authorMatteo Croce <mcroce@microsoft.com>2021-06-07 21:02:37 +0200
committerDavid S. Miller <davem@davemloft.net>2021-06-07 14:11:47 -0700
commitc420c98982fa9e749c99e022845d5f323d098b72 (patch)
tree4093aaf685c163ee03522e6ebaac03776605978c /net/core
parentc07aea3ef4d4076f18f567b98ed01e082e02ed51 (diff)
skbuff: add a parameter to __skb_frag_unref
This is a prerequisite patch, the next one is enabling recycling of skbs and fragments. Add an extra argument on __skb_frag_unref() to handle recycling, and update the current users of the function with that. Signed-off-by: Matteo Croce <mcroce@microsoft.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r--net/core/skbuff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 3ad22870298c..12b7e90dd2b5 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -664,7 +664,7 @@ static void skb_release_data(struct sk_buff *skb)
skb_zcopy_clear(skb, true);
for (i = 0; i < shinfo->nr_frags; i++)
- __skb_frag_unref(&shinfo->frags[i]);
+ __skb_frag_unref(&shinfo->frags[i], false);
if (shinfo->frag_list)
kfree_skb_list(shinfo->frag_list);
@@ -3495,7 +3495,7 @@ int skb_shift(struct sk_buff *tgt, struct sk_buff *skb, int shiftlen)
fragto = &skb_shinfo(tgt)->frags[merge];
skb_frag_size_add(fragto, skb_frag_size(fragfrom));
- __skb_frag_unref(fragfrom);
+ __skb_frag_unref(fragfrom, false);
}
/* Reposition in the original skb */