diff options
| author | David S. Miller <davem@davemloft.net> | 2017-09-01 20:22:04 -0700 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2017-09-01 20:22:04 -0700 |
| commit | 250b0f78310c11b41b941f6ccd6938b5cf7970cd (patch) | |
| tree | 14ee9ec0f2e759bb237b2a010aa56989874cc054 /include/linux | |
| parent | 487234cc1954a1c09115a82b45ebcc2086657572 (diff) | |
| parent | c1d1b437816f0afa99202be3cb650c9d174667bc (diff) | |
Merge branch 'net-ubuf_info-refcnt-conversion'
Eric Dumazet says:
====================
net: ubuf_info.refcnt conversion
Yet another atomic_t -> refcount_t conversion, split in two patches.
First patch prepares the automatic conversion done in the second patch.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/skbuff.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index f93cc01064cb..f751f3b93039 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -22,6 +22,7 @@ #include <linux/cache.h> #include <linux/rbtree.h> #include <linux/socket.h> +#include <linux/refcount.h> #include <linux/atomic.h> #include <asm/types.h> @@ -456,7 +457,7 @@ struct ubuf_info { u32 bytelen; }; }; - atomic_t refcnt; + refcount_t refcnt; struct mmpin { struct user_struct *user; @@ -472,7 +473,7 @@ struct ubuf_info *sock_zerocopy_realloc(struct sock *sk, size_t size, static inline void sock_zerocopy_get(struct ubuf_info *uarg) { - atomic_inc(&uarg->refcnt); + refcount_inc(&uarg->refcnt); } void sock_zerocopy_put(struct ubuf_info *uarg); |
