diff options
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r-- | include/linux/skbuff.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 005793e01bd2..90cbd86152da 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -761,7 +761,7 @@ struct sk_buff { | |||
761 | unsigned char *head, | 761 | unsigned char *head, |
762 | *data; | 762 | *data; |
763 | unsigned int truesize; | 763 | unsigned int truesize; |
764 | atomic_t users; | 764 | refcount_t users; |
765 | }; | 765 | }; |
766 | 766 | ||
767 | #ifdef __KERNEL__ | 767 | #ifdef __KERNEL__ |
@@ -872,9 +872,9 @@ static inline bool skb_unref(struct sk_buff *skb) | |||
872 | { | 872 | { |
873 | if (unlikely(!skb)) | 873 | if (unlikely(!skb)) |
874 | return false; | 874 | return false; |
875 | if (likely(atomic_read(&skb->users) == 1)) | 875 | if (likely(refcount_read(&skb->users) == 1)) |
876 | smp_rmb(); | 876 | smp_rmb(); |
877 | else if (likely(!atomic_dec_and_test(&skb->users))) | 877 | else if (likely(!refcount_dec_and_test(&skb->users))) |
878 | return false; | 878 | return false; |
879 | 879 | ||
880 | return true; | 880 | return true; |
@@ -1283,7 +1283,7 @@ static inline struct sk_buff *skb_queue_prev(const struct sk_buff_head *list, | |||
1283 | */ | 1283 | */ |
1284 | static inline struct sk_buff *skb_get(struct sk_buff *skb) | 1284 | static inline struct sk_buff *skb_get(struct sk_buff *skb) |
1285 | { | 1285 | { |
1286 | atomic_inc(&skb->users); | 1286 | refcount_inc(&skb->users); |
1287 | return skb; | 1287 | return skb; |
1288 | } | 1288 | } |
1289 | 1289 | ||
@@ -1384,7 +1384,7 @@ static inline void __skb_header_release(struct sk_buff *skb) | |||
1384 | */ | 1384 | */ |
1385 | static inline int skb_shared(const struct sk_buff *skb) | 1385 | static inline int skb_shared(const struct sk_buff *skb) |
1386 | { | 1386 | { |
1387 | return atomic_read(&skb->users) != 1; | 1387 | return refcount_read(&skb->users) != 1; |
1388 | } | 1388 | } |
1389 | 1389 | ||
1390 | /** | 1390 | /** |