X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=fs%2Fjfs%2Facl.c;h=a29c7c3e3fb81a58148c93e0dd56e858bac04939;hb=b855192c08fcb14adbc5d3a7cab182022d433cca;hp=f272bf032e1eb556d69170f51053a898b8e2169e;hpb=650a10dc484f067883fc05a2d4116e1ee3f909c0;p=deliverable%2Flinux.git diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c index f272bf032e1e..a29c7c3e3fb8 100644 --- a/fs/jfs/acl.c +++ b/fs/jfs/acl.c @@ -67,10 +67,8 @@ static struct posix_acl *jfs_get_acl(struct inode *inode, int type) acl = posix_acl_from_xattr(value, size); } kfree(value); - if (!IS_ERR(acl)) { + if (!IS_ERR(acl)) set_cached_acl(inode, type, acl); - posix_acl_release(acl); - } return acl; } @@ -118,15 +116,16 @@ out: static int jfs_check_acl(struct inode *inode, int mask) { - if (inode->i_acl == ACL_NOT_CACHED) { - struct posix_acl *acl = jfs_get_acl(inode, ACL_TYPE_ACCESS); - if (IS_ERR(acl)) - return PTR_ERR(acl); + struct posix_acl *acl = jfs_get_acl(inode, ACL_TYPE_ACCESS); + + if (IS_ERR(acl)) + return PTR_ERR(acl); + if (acl) { + int error = posix_acl_permission(inode, acl, mask); posix_acl_release(acl); + return error; } - if (inode->i_acl) - return posix_acl_permission(inode, inode->i_acl, mask); return -EAGAIN; }