]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - security/apparmor/include/policy.h
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux...
[mirror_ubuntu-artful-kernel.git] / security / apparmor / include / policy.h
index 93b1b1f440d339d4271540a5af2c4e988bcbe9bc..67bc96afe54185dff2b0792d5a4cfde8917fdb74 100644 (file)
@@ -240,7 +240,7 @@ static inline struct aa_profile *aa_get_profile(struct aa_profile *p)
  */
 static inline struct aa_profile *aa_get_profile_not0(struct aa_profile *p)
 {
-       if (p && kref_get_not0(&p->count))
+       if (p && kref_get_unless_zero(&p->count))
                return p;
 
        return NULL;
@@ -260,7 +260,7 @@ static inline struct aa_profile *aa_get_profile_rcu(struct aa_profile __rcu **p)
        rcu_read_lock();
        do {
                c = rcu_dereference(*p);
-       } while (c && !kref_get_not0(&c->count));
+       } while (c && !kref_get_unless_zero(&c->count));
        rcu_read_unlock();
 
        return c;