diff options
Diffstat (limited to 'include/linux/posix_acl.h')
-rw-r--r-- | include/linux/posix_acl.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/posix_acl.h b/include/linux/posix_acl.h index b2b7255ec7f5..540595a321a7 100644 --- a/include/linux/posix_acl.h +++ b/include/linux/posix_acl.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/bug.h> | 12 | #include <linux/bug.h> |
13 | #include <linux/slab.h> | 13 | #include <linux/slab.h> |
14 | #include <linux/rcupdate.h> | 14 | #include <linux/rcupdate.h> |
15 | #include <linux/refcount.h> | ||
15 | #include <uapi/linux/posix_acl.h> | 16 | #include <uapi/linux/posix_acl.h> |
16 | 17 | ||
17 | struct posix_acl_entry { | 18 | struct posix_acl_entry { |
@@ -24,7 +25,7 @@ struct posix_acl_entry { | |||
24 | }; | 25 | }; |
25 | 26 | ||
26 | struct posix_acl { | 27 | struct posix_acl { |
27 | atomic_t a_refcount; | 28 | refcount_t a_refcount; |
28 | struct rcu_head a_rcu; | 29 | struct rcu_head a_rcu; |
29 | unsigned int a_count; | 30 | unsigned int a_count; |
30 | struct posix_acl_entry a_entries[0]; | 31 | struct posix_acl_entry a_entries[0]; |
@@ -41,7 +42,7 @@ static inline struct posix_acl * | |||
41 | posix_acl_dup(struct posix_acl *acl) | 42 | posix_acl_dup(struct posix_acl *acl) |
42 | { | 43 | { |
43 | if (acl) | 44 | if (acl) |
44 | atomic_inc(&acl->a_refcount); | 45 | refcount_inc(&acl->a_refcount); |
45 | return acl; | 46 | return acl; |
46 | } | 47 | } |
47 | 48 | ||
@@ -51,7 +52,7 @@ posix_acl_dup(struct posix_acl *acl) | |||
51 | static inline void | 52 | static inline void |
52 | posix_acl_release(struct posix_acl *acl) | 53 | posix_acl_release(struct posix_acl *acl) |
53 | { | 54 | { |
54 | if (acl && atomic_dec_and_test(&acl->a_refcount)) | 55 | if (acl && refcount_dec_and_test(&acl->a_refcount)) |
55 | kfree_rcu(acl, a_rcu); | 56 | kfree_rcu(acl, a_rcu); |
56 | } | 57 | } |
57 | 58 | ||