]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - include/linux/posix_acl.h
Merge branch 'x86-olpc-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[mv-sheeva.git] / include / linux / posix_acl.h
index 67608161df6b574eb5e382678d58e9683e30a6a6..d68283a898bb8df089a5f04e29160eaea1c315b3 100644 (file)
@@ -108,6 +108,25 @@ static inline struct posix_acl *get_cached_acl(struct inode *inode, int type)
        return acl;
 }
 
+static inline int negative_cached_acl(struct inode *inode, int type)
+{
+       struct posix_acl **p, *acl;
+       switch (type) {
+       case ACL_TYPE_ACCESS:
+               p = &inode->i_acl;
+               break;
+       case ACL_TYPE_DEFAULT:
+               p = &inode->i_default_acl;
+               break;
+       default:
+               BUG();
+       }
+       acl = ACCESS_ONCE(*p);
+       if (acl)
+               return 0;
+       return 1;
+}
+
 static inline void set_cached_acl(struct inode *inode,
                                  int type,
                                  struct posix_acl *acl)