diff options
author | Paul Moore <pmoore@redhat.com> | 2013-11-08 13:56:38 -0500 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2013-11-08 13:56:38 -0500 |
commit | 94851b18d4eb94f8bbf0d9176f7429bd8e371f62 (patch) | |
tree | c3c743ac6323e1caf9e987d6946cc4b2333a8256 /security/apparmor/include/apparmor.h | |
parent | 42d64e1add3a1ce8a787116036163b8724362145 (diff) | |
parent | 5e01dc7b26d9f24f39abace5da98ccbd6a5ceb52 (diff) | |
download | talos-op-linux-94851b18d4eb94f8bbf0d9176f7429bd8e371f62.tar.gz talos-op-linux-94851b18d4eb94f8bbf0d9176f7429bd8e371f62.zip |
Merge tag 'v3.12'
Linux 3.12
Diffstat (limited to 'security/apparmor/include/apparmor.h')
-rw-r--r-- | security/apparmor/include/apparmor.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/security/apparmor/include/apparmor.h b/security/apparmor/include/apparmor.h index 1ba2ca56a6ef..8fb1488a3cd4 100644 --- a/security/apparmor/include/apparmor.h +++ b/security/apparmor/include/apparmor.h @@ -78,6 +78,12 @@ static inline void *kvzalloc(size_t size) return __aa_kvmalloc(size, __GFP_ZERO); } +/* returns 0 if kref not incremented */ +static inline int kref_get_not0(struct kref *kref) +{ + return atomic_inc_not_zero(&kref->refcount); +} + /** * aa_strneq - compare null terminated @str to a non null terminated substring * @str: a null terminated string |