vfs: move ACL cache lookup into generic code
[pandora-kernel.git] / fs / ocfs2 / acl.c
index e913ad1..aff23e5 100644 (file)
@@ -290,16 +290,13 @@ static int ocfs2_set_acl(handle_t *handle,
        return ret;
 }
 
-int ocfs2_check_acl(struct inode *inode, int mask, unsigned int flags)
+int ocfs2_check_acl(struct inode *inode, int mask)
 {
        struct ocfs2_super *osb;
        struct buffer_head *di_bh = NULL;
        struct posix_acl *acl;
        int ret = -EAGAIN;
 
-       if (flags & IPERM_FLAG_RCU)
-               return -ECHILD;
-
        osb = OCFS2_SB(inode->i_sb);
        if (!(osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL))
                return ret;
@@ -409,6 +406,7 @@ int ocfs2_init_acl(handle_t *handle,
                        if (ret2) {
                                mlog_errno(ret2);
                                ret = ret2;
+                               posix_acl_release(clone);
                                goto cleanup;
                        }
                        if (ret > 0) {