@@ -1047,6 +1047,7 @@ static inline bool skb_unref(struct sk_buff *skb)
return true;
}
+void skb_dst_drop(struct sk_buff *skb);
void skb_release_head_state(struct sk_buff *skb);
void kfree_skb(struct sk_buff *skb);
void kfree_skb_list(struct sk_buff *segs);
@@ -259,20 +259,6 @@ static inline void refdst_drop(unsigned long refdst)
dst_release((struct dst_entry *)(refdst & SKB_DST_PTRMASK));
}
-/**
- * skb_dst_drop - drops skb dst
- * @skb: buffer
- *
- * Drops dst reference count if a reference was taken.
- */
-static inline void skb_dst_drop(struct sk_buff *skb)
-{
- if (skb->_skb_refdst) {
- refdst_drop(skb->_skb_refdst);
- skb->_skb_refdst = 0UL;
- }
-}
-
static inline void __skb_dst_copy(struct sk_buff *nskb, unsigned long refdst)
{
nskb->_skb_refdst = refdst;
@@ -1034,6 +1034,21 @@ struct sk_buff *alloc_skb_for_msg(struct sk_buff *first)
}
EXPORT_SYMBOL_GPL(alloc_skb_for_msg);
+/**
+ * skb_dst_drop - drops skb dst
+ * @skb: buffer
+ *
+ * Drops dst reference count if a reference was taken.
+ */
+void skb_dst_drop(struct sk_buff *skb)
+{
+ if (skb->_skb_refdst) {
+ refdst_drop(skb->_skb_refdst);
+ skb->_skb_refdst = 0UL;
+ }
+}
+EXPORT_SYMBOL_GPL(skb_dst_drop);
+
/**
* skb_morph - morph one skb into another
* @dst: the skb to receive the contents
Prepare for extending this function to handle dst_sk_prefetch by moving it away from the generic dst header and into the skbuff code. Signed-off-by: Joe Stringer <joe@wand.net.nz> --- include/linux/skbuff.h | 1 + include/net/dst.h | 14 -------------- net/core/skbuff.c | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 14 deletions(-)