net: do not take an additional reference in skb_frag_set_page
I audited all of the callers in the tree and only one of them (pktgen) expects it to do so. Taking this reference is pretty obviously confusing and error prone. In particular I looked at the following commits which switched callers of (__)skb_frag_set_page to the skb paged fragment api:6a930b9f16
cxgb3: convert to SKB paged frag API.5dc3e196ea
myri10ge: convert to SKB paged frag API.0e0634d20d
vmxnet3: convert to SKB paged frag API.86ee8130a4
virtionet: convert to SKB paged frag API.4a22c4c919
sfc: convert to SKB paged frag API.18324d690d
cassini: convert to SKB paged frag API.b061b39e3a
benet: convert to SKB paged frag API.b7b6a688d2
bnx2: convert to SKB paged frag API.804cf14ea5
net: xfrm: convert to SKB frag APIsea2ab69379
net: convert core to skb paged frag APIs Signed-off-by: Ian Campbell <ian.campbell@citrix.com> Acked-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
e049f28883
commit
a0bec1cd8f
2 changed files with 1 additions and 1 deletions
|
@ -1786,7 +1786,6 @@ static inline void *skb_frag_address_safe(const skb_frag_t *frag)
|
|||
static inline void __skb_frag_set_page(skb_frag_t *frag, struct page *page)
|
||||
{
|
||||
frag->page = page;
|
||||
__skb_frag_ref(frag);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -2602,6 +2602,7 @@ static void pktgen_finalize_skb(struct pktgen_dev *pkt_dev, struct sk_buff *skb,
|
|||
if (!pkt_dev->page)
|
||||
break;
|
||||
}
|
||||
get_page(pkt_dev->page);
|
||||
skb_frag_set_page(skb, i, pkt_dev->page);
|
||||
skb_shinfo(skb)->frags[i].page_offset = 0;
|
||||
/*last fragment, fill rest of data*/
|
||||
|
|
Loading…
Reference in a new issue