net: Remove useless function skb_header_release
There is no one which would invokes the function skb_header_release. So just remove it now. Signed-off-by: Gao Feng <gfree.wind@vip.163.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
dd54379749
commit
242c1a28eb
3 changed files with 2 additions and 21 deletions
|
@ -245,7 +245,7 @@ struct sk_buff *asix_tx_fixup(struct usbnet *dev, struct sk_buff *skb,
|
||||||
* - We are allowed to put 4 bytes at tail if skb_cloned()
|
* - We are allowed to put 4 bytes at tail if skb_cloned()
|
||||||
* is false (and if we have 4 bytes of tailroom)
|
* is false (and if we have 4 bytes of tailroom)
|
||||||
*
|
*
|
||||||
* TCP packets for example are cloned, but skb_header_release()
|
* TCP packets for example are cloned, but __skb_header_release()
|
||||||
* was called in tcp stack, allowing us to use headroom for our needs.
|
* was called in tcp stack, allowing us to use headroom for our needs.
|
||||||
*/
|
*/
|
||||||
if (!skb_header_cloned(skb) &&
|
if (!skb_header_cloned(skb) &&
|
||||||
|
|
|
@ -1456,28 +1456,9 @@ static inline int skb_header_unclone(struct sk_buff *skb, gfp_t pri)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* skb_header_release - release reference to header
|
|
||||||
* @skb: buffer to operate on
|
|
||||||
*
|
|
||||||
* Drop a reference to the header part of the buffer. This is done
|
|
||||||
* by acquiring a payload reference. You must not read from the header
|
|
||||||
* part of skb->data after this.
|
|
||||||
* Note : Check if you can use __skb_header_release() instead.
|
|
||||||
*/
|
|
||||||
static inline void skb_header_release(struct sk_buff *skb)
|
|
||||||
{
|
|
||||||
BUG_ON(skb->nohdr);
|
|
||||||
skb->nohdr = 1;
|
|
||||||
atomic_add(1 << SKB_DATAREF_SHIFT, &skb_shinfo(skb)->dataref);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* __skb_header_release - release reference to header
|
* __skb_header_release - release reference to header
|
||||||
* @skb: buffer to operate on
|
* @skb: buffer to operate on
|
||||||
*
|
|
||||||
* Variant of skb_header_release() assuming skb is private to caller.
|
|
||||||
* We can avoid one atomic operation.
|
|
||||||
*/
|
*/
|
||||||
static inline void __skb_header_release(struct sk_buff *skb)
|
static inline void __skb_header_release(struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
|
|
|
@ -69,7 +69,7 @@ int batadv_skb_head_push(struct sk_buff *skb, unsigned int len)
|
||||||
int result;
|
int result;
|
||||||
|
|
||||||
/* TODO: We must check if we can release all references to non-payload
|
/* TODO: We must check if we can release all references to non-payload
|
||||||
* data using skb_header_release in our skbs to allow skb_cow_header to
|
* data using __skb_header_release in our skbs to allow skb_cow_header to
|
||||||
* work optimally. This means that those skbs are not allowed to read
|
* work optimally. This means that those skbs are not allowed to read
|
||||||
* or write any data which is before the current position of skb->data
|
* or write any data which is before the current position of skb->data
|
||||||
* after that call and thus allow other skbs with the same data buffer
|
* after that call and thus allow other skbs with the same data buffer
|
||||||
|
|
Loading…
Add table
Reference in a new issue