summaryrefslogtreecommitdiffstats
path: root/fs/ext2/acl.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-06-08 19:52:55 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-24 08:15:28 -0400
commit5e78b435683daaaacadad1b2aeefb8904cf6acfb (patch)
treeaf67da5df474d5c2ecfb949acf9246d2ef74be8b /fs/ext2/acl.c
parentf19d4a8fa6f9b6ccf54df0971c97ffcaa390b7b0 (diff)
downloadop-kernel-dev-5e78b435683daaaacadad1b2aeefb8904cf6acfb.zip
op-kernel-dev-5e78b435683daaaacadad1b2aeefb8904cf6acfb.tar.gz
switch ext2 to inode->i_acl
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext2/acl.c')
-rw-r--r--fs/ext2/acl.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c
index d46e38c..d2ffddc 100644
--- a/fs/ext2/acl.c
+++ b/fs/ext2/acl.c
@@ -128,10 +128,10 @@ fail:
static inline struct posix_acl *
ext2_iget_acl(struct inode *inode, struct posix_acl **i_acl)
{
- struct posix_acl *acl = EXT2_ACL_NOT_CACHED;
+ struct posix_acl *acl = ACL_NOT_CACHED;
spin_lock(&inode->i_lock);
- if (*i_acl != EXT2_ACL_NOT_CACHED)
+ if (*i_acl != ACL_NOT_CACHED)
acl = posix_acl_dup(*i_acl);
spin_unlock(&inode->i_lock);
@@ -143,7 +143,7 @@ ext2_iset_acl(struct inode *inode, struct posix_acl **i_acl,
struct posix_acl *acl)
{
spin_lock(&inode->i_lock);
- if (*i_acl != EXT2_ACL_NOT_CACHED)
+ if (*i_acl != ACL_NOT_CACHED)
posix_acl_release(*i_acl);
*i_acl = posix_acl_dup(acl);
spin_unlock(&inode->i_lock);
@@ -155,7 +155,6 @@ ext2_iset_acl(struct inode *inode, struct posix_acl **i_acl,
static struct posix_acl *
ext2_get_acl(struct inode *inode, int type)
{
- struct ext2_inode_info *ei = EXT2_I(inode);
int name_index;
char *value = NULL;
struct posix_acl *acl;
@@ -166,15 +165,15 @@ ext2_get_acl(struct inode *inode, int type)
switch(type) {
case ACL_TYPE_ACCESS:
- acl = ext2_iget_acl(inode, &ei->i_acl);
- if (acl != EXT2_ACL_NOT_CACHED)
+ acl = ext2_iget_acl(inode, &inode->i_acl);
+ if (acl != ACL_NOT_CACHED)
return acl;
name_index = EXT2_XATTR_INDEX_POSIX_ACL_ACCESS;
break;
case ACL_TYPE_DEFAULT:
- acl = ext2_iget_acl(inode, &ei->i_default_acl);
- if (acl != EXT2_ACL_NOT_CACHED)
+ acl = ext2_iget_acl(inode, &inode->i_default_acl);
+ if (acl != ACL_NOT_CACHED)
return acl;
name_index = EXT2_XATTR_INDEX_POSIX_ACL_DEFAULT;
break;
@@ -200,11 +199,11 @@ ext2_get_acl(struct inode *inode, int type)
if (!IS_ERR(acl)) {
switch(type) {
case ACL_TYPE_ACCESS:
- ext2_iset_acl(inode, &ei->i_acl, acl);
+ ext2_iset_acl(inode, &inode->i_acl, acl);
break;
case ACL_TYPE_DEFAULT:
- ext2_iset_acl(inode, &ei->i_default_acl, acl);
+ ext2_iset_acl(inode, &inode->i_default_acl, acl);
break;
}
}
@@ -217,7 +216,6 @@ ext2_get_acl(struct inode *inode, int type)
static int
ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
{
- struct ext2_inode_info *ei = EXT2_I(inode);
int name_index;
void *value = NULL;
size_t size = 0;
@@ -266,11 +264,11 @@ ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
if (!error) {
switch(type) {
case ACL_TYPE_ACCESS:
- ext2_iset_acl(inode, &ei->i_acl, acl);
+ ext2_iset_acl(inode, &inode->i_acl, acl);
break;
case ACL_TYPE_DEFAULT:
- ext2_iset_acl(inode, &ei->i_default_acl, acl);
+ ext2_iset_acl(inode, &inode->i_default_acl, acl);
break;
}
}
OpenPOWER on IntegriCloud