aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/acl.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-06-08 19:55:32 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-24 08:17:05 -0400
commit5affd88a104af43f0063a12ad1ee4c7a587945dc (patch)
tree95c727eac8669bd346f937b8be2d58ef716a2fe5 /fs/btrfs/acl.c
parent290c263bf83cd78e53b1aa3b42165f588163f2be (diff)
switch btrfs to inode->i_acl
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/acl.c')
-rw-r--r--fs/btrfs/acl.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
index 603972576f0f..6db8a42a3e5e 100644
--- a/fs/btrfs/acl.c
+++ b/fs/btrfs/acl.c
@@ -34,7 +34,7 @@ static void btrfs_update_cached_acl(struct inode *inode,
34 struct posix_acl *acl) 34 struct posix_acl *acl)
35{ 35{
36 spin_lock(&inode->i_lock); 36 spin_lock(&inode->i_lock);
37 if (*p_acl && *p_acl != BTRFS_ACL_NOT_CACHED) 37 if (*p_acl && *p_acl != ACL_NOT_CACHED)
38 posix_acl_release(*p_acl); 38 posix_acl_release(*p_acl);
39 *p_acl = posix_acl_dup(acl); 39 *p_acl = posix_acl_dup(acl);
40 spin_unlock(&inode->i_lock); 40 spin_unlock(&inode->i_lock);
@@ -50,11 +50,11 @@ static struct posix_acl *btrfs_get_acl(struct inode *inode, int type)
50 switch (type) { 50 switch (type) {
51 case ACL_TYPE_ACCESS: 51 case ACL_TYPE_ACCESS:
52 name = POSIX_ACL_XATTR_ACCESS; 52 name = POSIX_ACL_XATTR_ACCESS;
53 p_acl = &BTRFS_I(inode)->i_acl; 53 p_acl = &inode->i_acl;
54 break; 54 break;
55 case ACL_TYPE_DEFAULT: 55 case ACL_TYPE_DEFAULT:
56 name = POSIX_ACL_XATTR_DEFAULT; 56 name = POSIX_ACL_XATTR_DEFAULT;
57 p_acl = &BTRFS_I(inode)->i_default_acl; 57 p_acl = &inode->i_default_acl;
58 break; 58 break;
59 default: 59 default:
60 return ERR_PTR(-EINVAL); 60 return ERR_PTR(-EINVAL);
@@ -67,11 +67,11 @@ static struct posix_acl *btrfs_get_acl(struct inode *inode, int type)
67 67
68 spin_lock(&inode->i_lock); 68 spin_lock(&inode->i_lock);
69 acl = *p_acl; 69 acl = *p_acl;
70 if (acl != BTRFS_ACL_NOT_CACHED) 70 if (acl != ACL_NOT_CACHED)
71 acl = posix_acl_dup(acl); 71 acl = posix_acl_dup(acl);
72 spin_unlock(&inode->i_lock); 72 spin_unlock(&inode->i_lock);
73 73
74 if (acl != BTRFS_ACL_NOT_CACHED) 74 if (acl != ACL_NOT_CACHED)
75 return acl; 75 return acl;
76 76
77 size = __btrfs_getxattr(inode, name, "", 0); 77 size = __btrfs_getxattr(inode, name, "", 0);
@@ -141,13 +141,13 @@ static int btrfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
141 ret = 0; 141 ret = 0;
142 inode->i_mode = mode; 142 inode->i_mode = mode;
143 name = POSIX_ACL_XATTR_ACCESS; 143 name = POSIX_ACL_XATTR_ACCESS;
144 p_acl = &BTRFS_I(inode)->i_acl; 144 p_acl = &inode->i_acl;
145 break; 145 break;
146 case ACL_TYPE_DEFAULT: 146 case ACL_TYPE_DEFAULT:
147 if (!S_ISDIR(inode->i_mode)) 147 if (!S_ISDIR(inode->i_mode))
148 return acl ? -EINVAL : 0; 148 return acl ? -EINVAL : 0;
149 name = POSIX_ACL_XATTR_DEFAULT; 149 name = POSIX_ACL_XATTR_DEFAULT;
150 p_acl = &BTRFS_I(inode)->i_default_acl; 150 p_acl = &inode->i_default_acl;
151 break; 151 break;
152 default: 152 default:
153 return -EINVAL; 153 return -EINVAL;