diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-08 19:52:55 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-24 08:15:28 -0400 |
commit | 5e78b435683daaaacadad1b2aeefb8904cf6acfb (patch) | |
tree | af67da5df474d5c2ecfb949acf9246d2ef74be8b /fs/ext2/acl.c | |
parent | f19d4a8fa6f9b6ccf54df0971c97ffcaa390b7b0 (diff) |
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.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c index d46e38cb85c..d2ffddc1211 100644 --- a/fs/ext2/acl.c +++ b/fs/ext2/acl.c | |||
@@ -128,10 +128,10 @@ fail: | |||
128 | static inline struct posix_acl * | 128 | static inline struct posix_acl * |
129 | ext2_iget_acl(struct inode *inode, struct posix_acl **i_acl) | 129 | ext2_iget_acl(struct inode *inode, struct posix_acl **i_acl) |
130 | { | 130 | { |
131 | struct posix_acl *acl = EXT2_ACL_NOT_CACHED; | 131 | struct posix_acl *acl = ACL_NOT_CACHED; |
132 | 132 | ||
133 | spin_lock(&inode->i_lock); | 133 | spin_lock(&inode->i_lock); |
134 | if (*i_acl != EXT2_ACL_NOT_CACHED) | 134 | if (*i_acl != ACL_NOT_CACHED) |
135 | acl = posix_acl_dup(*i_acl); | 135 | acl = posix_acl_dup(*i_acl); |
136 | spin_unlock(&inode->i_lock); | 136 | spin_unlock(&inode->i_lock); |
137 | 137 | ||
@@ -143,7 +143,7 @@ ext2_iset_acl(struct inode *inode, struct posix_acl **i_acl, | |||
143 | struct posix_acl *acl) | 143 | struct posix_acl *acl) |
144 | { | 144 | { |
145 | spin_lock(&inode->i_lock); | 145 | spin_lock(&inode->i_lock); |
146 | if (*i_acl != EXT2_ACL_NOT_CACHED) | 146 | if (*i_acl != ACL_NOT_CACHED) |
147 | posix_acl_release(*i_acl); | 147 | posix_acl_release(*i_acl); |
148 | *i_acl = posix_acl_dup(acl); | 148 | *i_acl = posix_acl_dup(acl); |
149 | spin_unlock(&inode->i_lock); | 149 | spin_unlock(&inode->i_lock); |
@@ -155,7 +155,6 @@ ext2_iset_acl(struct inode *inode, struct posix_acl **i_acl, | |||
155 | static struct posix_acl * | 155 | static struct posix_acl * |
156 | ext2_get_acl(struct inode *inode, int type) | 156 | ext2_get_acl(struct inode *inode, int type) |
157 | { | 157 | { |
158 | struct ext2_inode_info *ei = EXT2_I(inode); | ||
159 | int name_index; | 158 | int name_index; |
160 | char *value = NULL; | 159 | char *value = NULL; |
161 | struct posix_acl *acl; | 160 | struct posix_acl *acl; |
@@ -166,15 +165,15 @@ ext2_get_acl(struct inode *inode, int type) | |||
166 | 165 | ||
167 | switch(type) { | 166 | switch(type) { |
168 | case ACL_TYPE_ACCESS: | 167 | case ACL_TYPE_ACCESS: |
169 | acl = ext2_iget_acl(inode, &ei->i_acl); | 168 | acl = ext2_iget_acl(inode, &inode->i_acl); |
170 | if (acl != EXT2_ACL_NOT_CACHED) | 169 | if (acl != ACL_NOT_CACHED) |
171 | return acl; | 170 | return acl; |
172 | name_index = EXT2_XATTR_INDEX_POSIX_ACL_ACCESS; | 171 | name_index = EXT2_XATTR_INDEX_POSIX_ACL_ACCESS; |
173 | break; | 172 | break; |
174 | 173 | ||
175 | case ACL_TYPE_DEFAULT: | 174 | case ACL_TYPE_DEFAULT: |
176 | acl = ext2_iget_acl(inode, &ei->i_default_acl); | 175 | acl = ext2_iget_acl(inode, &inode->i_default_acl); |
177 | if (acl != EXT2_ACL_NOT_CACHED) | 176 | if (acl != ACL_NOT_CACHED) |
178 | return acl; | 177 | return acl; |
179 | name_index = EXT2_XATTR_INDEX_POSIX_ACL_DEFAULT; | 178 | name_index = EXT2_XATTR_INDEX_POSIX_ACL_DEFAULT; |
180 | break; | 179 | break; |
@@ -200,11 +199,11 @@ ext2_get_acl(struct inode *inode, int type) | |||
200 | if (!IS_ERR(acl)) { | 199 | if (!IS_ERR(acl)) { |
201 | switch(type) { | 200 | switch(type) { |
202 | case ACL_TYPE_ACCESS: | 201 | case ACL_TYPE_ACCESS: |
203 | ext2_iset_acl(inode, &ei->i_acl, acl); | 202 | ext2_iset_acl(inode, &inode->i_acl, acl); |
204 | break; | 203 | break; |
205 | 204 | ||
206 | case ACL_TYPE_DEFAULT: | 205 | case ACL_TYPE_DEFAULT: |
207 | ext2_iset_acl(inode, &ei->i_default_acl, acl); | 206 | ext2_iset_acl(inode, &inode->i_default_acl, acl); |
208 | break; | 207 | break; |
209 | } | 208 | } |
210 | } | 209 | } |
@@ -217,7 +216,6 @@ ext2_get_acl(struct inode *inode, int type) | |||
217 | static int | 216 | static int |
218 | ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl) | 217 | ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl) |
219 | { | 218 | { |
220 | struct ext2_inode_info *ei = EXT2_I(inode); | ||
221 | int name_index; | 219 | int name_index; |
222 | void *value = NULL; | 220 | void *value = NULL; |
223 | size_t size = 0; | 221 | size_t size = 0; |
@@ -266,11 +264,11 @@ ext2_set_acl(struct inode *inode, int type, struct posix_acl *acl) | |||
266 | if (!error) { | 264 | if (!error) { |
267 | switch(type) { | 265 | switch(type) { |
268 | case ACL_TYPE_ACCESS: | 266 | case ACL_TYPE_ACCESS: |
269 | ext2_iset_acl(inode, &ei->i_acl, acl); | 267 | ext2_iset_acl(inode, &inode->i_acl, acl); |
270 | break; | 268 | break; |
271 | 269 | ||
272 | case ACL_TYPE_DEFAULT: | 270 | case ACL_TYPE_DEFAULT: |
273 | ext2_iset_acl(inode, &ei->i_default_acl, acl); | 271 | ext2_iset_acl(inode, &inode->i_default_acl, acl); |
274 | break; | 272 | break; |
275 | } | 273 | } |
276 | } | 274 | } |