aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/skbuff.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r--net/core/skbuff.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index f75897a33fa4..45dc6620dd74 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -176,7 +176,7 @@ struct sk_buff *__alloc_skb_head(gfp_t gfp_mask, int node)
176 memset(skb, 0, offsetof(struct sk_buff, tail)); 176 memset(skb, 0, offsetof(struct sk_buff, tail));
177 skb->head = NULL; 177 skb->head = NULL;
178 skb->truesize = sizeof(struct sk_buff); 178 skb->truesize = sizeof(struct sk_buff);
179 atomic_set(&skb->users, 1); 179 refcount_set(&skb->users, 1);
180 180
181 skb->mac_header = (typeof(skb->mac_header))~0U; 181 skb->mac_header = (typeof(skb->mac_header))~0U;
182out: 182out:
@@ -247,7 +247,7 @@ struct sk_buff *__alloc_skb(unsigned int size, gfp_t gfp_mask,
247 /* Account for allocated memory : skb + skb->head */ 247 /* Account for allocated memory : skb + skb->head */
248 skb->truesize = SKB_TRUESIZE(size); 248 skb->truesize = SKB_TRUESIZE(size);
249 skb->pfmemalloc = pfmemalloc; 249 skb->pfmemalloc = pfmemalloc;
250 atomic_set(&skb->users, 1); 250 refcount_set(&skb->users, 1);
251 skb->head = data; 251 skb->head = data;
252 skb->data = data; 252 skb->data = data;
253 skb_reset_tail_pointer(skb); 253 skb_reset_tail_pointer(skb);
@@ -314,7 +314,7 @@ struct sk_buff *__build_skb(void *data, unsigned int frag_size)
314 314
315 memset(skb, 0, offsetof(struct sk_buff, tail)); 315 memset(skb, 0, offsetof(struct sk_buff, tail));
316 skb->truesize = SKB_TRUESIZE(size); 316 skb->truesize = SKB_TRUESIZE(size);
317 atomic_set(&skb->users, 1); 317 refcount_set(&skb->users, 1);
318 skb->head = data; 318 skb->head = data;
319 skb->data = data; 319 skb->data = data;
320 skb_reset_tail_pointer(skb); 320 skb_reset_tail_pointer(skb);
@@ -915,7 +915,7 @@ static struct sk_buff *__skb_clone(struct sk_buff *n, struct sk_buff *skb)
915 C(head_frag); 915 C(head_frag);
916 C(data); 916 C(data);
917 C(truesize); 917 C(truesize);
918 atomic_set(&n->users, 1); 918 refcount_set(&n->users, 1);
919 919
920 atomic_inc(&(skb_shinfo(skb)->dataref)); 920 atomic_inc(&(skb_shinfo(skb)->dataref));
921 skb->cloned = 1; 921 skb->cloned = 1;