Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209278
b: refs/heads/master
c: 845b6cf
h: refs/heads/master
v: v3
  • Loading branch information
Jiaju Zhang authored and Joel Becker committed Aug 7, 2010
1 parent 30380fb commit b6011eb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8a2e70c40ff58f82dde67770e6623ca45f0cb0c8
refs/heads/master: 845b6cf34150100deb5f58c8a37a372b111f2918
24 changes: 21 additions & 3 deletions trunk/fs/ocfs2/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,12 +290,30 @@ static int ocfs2_set_acl(handle_t *handle,

int ocfs2_check_acl(struct inode *inode, int mask)
{
struct posix_acl *acl = ocfs2_get_acl(inode, ACL_TYPE_ACCESS);
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct buffer_head *di_bh = NULL;
struct posix_acl *acl;
int ret = -EAGAIN;

if (IS_ERR(acl))
if (!(osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL))
return ret;

ret = ocfs2_read_inode_block(inode, &di_bh);
if (ret < 0) {
mlog_errno(ret);
return ret;
}

acl = ocfs2_get_acl_nolock(inode, ACL_TYPE_ACCESS, di_bh);

brelse(di_bh);

if (IS_ERR(acl)) {
mlog_errno(PTR_ERR(acl));
return PTR_ERR(acl);
}
if (acl) {
int ret = posix_acl_permission(inode, acl, mask);
ret = posix_acl_permission(inode, acl, mask);
posix_acl_release(acl);
return ret;
}
Expand Down

0 comments on commit b6011eb

Please sign in to comment.