->permission() sanitizing: pass MAY_NOT_BLOCK to ->check_acl()
[platform/kernel/linux-rpi.git] / fs / ext2 / acl.c
index 7b41805..6b9442d 100644 (file)
@@ -236,7 +236,7 @@ ext2_check_acl(struct inode *inode, int mask, unsigned int flags)
 {
        struct posix_acl *acl;
 
-       if (flags & IPERM_FLAG_RCU) {
+       if (mask & MAY_NOT_BLOCK) {
                if (!negative_cached_acl(inode, ACL_TYPE_ACCESS))
                        return -ECHILD;
                return -EAGAIN;
@@ -406,7 +406,7 @@ ext2_xattr_set_acl(struct dentry *dentry, const char *name, const void *value,
                return -EINVAL;
        if (!test_opt(dentry->d_sb, POSIX_ACL))
                return -EOPNOTSUPP;
-       if (!is_owner_or_cap(dentry->d_inode))
+       if (!inode_owner_or_capable(dentry->d_inode))
                return -EPERM;
 
        if (value) {