|
@@ -230,6 +230,21 @@ static int ocfs2_set_acl(handle_t *handle,
|
|
|
return ret;
|
|
|
}
|
|
|
|
|
|
+int ocfs2_check_acl(struct inode *inode, int mask)
|
|
|
+{
|
|
|
+ struct posix_acl *acl = ocfs2_get_acl(inode, ACL_TYPE_ACCESS);
|
|
|
+
|
|
|
+ if (IS_ERR(acl))
|
|
|
+ return PTR_ERR(acl);
|
|
|
+ if (acl) {
|
|
|
+ int ret = posix_acl_permission(inode, acl, mask);
|
|
|
+ posix_acl_release(acl);
|
|
|
+ return ret;
|
|
|
+ }
|
|
|
+
|
|
|
+ return -EAGAIN;
|
|
|
+}
|
|
|
+
|
|
|
static size_t ocfs2_xattr_list_acl_access(struct inode *inode,
|
|
|
char *list,
|
|
|
size_t list_len,
|