diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-08 19:54:26 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-24 08:17:04 -0400 |
commit | d4bfe2f76d785cc77611a4bda8cedaff358d8c7d (patch) | |
tree | a8c953fe752afebadb4f0fb4aa3e80dbab934f7f /fs/ext4/acl.c | |
parent | 6582a0e6f6bc7bf64817b9e1a424782855292ab0 (diff) |
switch ext4 to inode->i_acl
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext4/acl.c')
-rw-r--r-- | fs/ext4/acl.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c index 605aeed96d68..0084e3a19d86 100644 --- a/fs/ext4/acl.c +++ b/fs/ext4/acl.c | |||
@@ -134,7 +134,7 @@ ext4_iget_acl(struct inode *inode, struct posix_acl **i_acl) | |||
134 | if (acl) { | 134 | if (acl) { |
135 | spin_lock(&inode->i_lock); | 135 | spin_lock(&inode->i_lock); |
136 | acl = *i_acl; | 136 | acl = *i_acl; |
137 | if (acl != EXT4_ACL_NOT_CACHED) | 137 | if (acl != ACL_NOT_CACHED) |
138 | acl = posix_acl_dup(acl); | 138 | acl = posix_acl_dup(acl); |
139 | spin_unlock(&inode->i_lock); | 139 | spin_unlock(&inode->i_lock); |
140 | } | 140 | } |
@@ -147,7 +147,7 @@ ext4_iset_acl(struct inode *inode, struct posix_acl **i_acl, | |||
147 | struct posix_acl *acl) | 147 | struct posix_acl *acl) |
148 | { | 148 | { |
149 | spin_lock(&inode->i_lock); | 149 | spin_lock(&inode->i_lock); |
150 | if (*i_acl != EXT4_ACL_NOT_CACHED) | 150 | if (*i_acl != ACL_NOT_CACHED) |
151 | posix_acl_release(*i_acl); | 151 | posix_acl_release(*i_acl); |
152 | *i_acl = posix_acl_dup(acl); | 152 | *i_acl = posix_acl_dup(acl); |
153 | spin_unlock(&inode->i_lock); | 153 | spin_unlock(&inode->i_lock); |
@@ -161,7 +161,6 @@ ext4_iset_acl(struct inode *inode, struct posix_acl **i_acl, | |||
161 | static struct posix_acl * | 161 | static struct posix_acl * |
162 | ext4_get_acl(struct inode *inode, int type) | 162 | ext4_get_acl(struct inode *inode, int type) |
163 | { | 163 | { |
164 | struct ext4_inode_info *ei = EXT4_I(inode); | ||
165 | int name_index; | 164 | int name_index; |
166 | char *value = NULL; | 165 | char *value = NULL; |
167 | struct posix_acl *acl; | 166 | struct posix_acl *acl; |
@@ -172,15 +171,15 @@ ext4_get_acl(struct inode *inode, int type) | |||
172 | 171 | ||
173 | switch (type) { | 172 | switch (type) { |
174 | case ACL_TYPE_ACCESS: | 173 | case ACL_TYPE_ACCESS: |
175 | acl = ext4_iget_acl(inode, &ei->i_acl); | 174 | acl = ext4_iget_acl(inode, &inode->i_acl); |
176 | if (acl != EXT4_ACL_NOT_CACHED) | 175 | if (acl != ACL_NOT_CACHED) |
177 | return acl; | 176 | return acl; |
178 | name_index = EXT4_XATTR_INDEX_POSIX_ACL_ACCESS; | 177 | name_index = EXT4_XATTR_INDEX_POSIX_ACL_ACCESS; |
179 | break; | 178 | break; |
180 | 179 | ||
181 | case ACL_TYPE_DEFAULT: | 180 | case ACL_TYPE_DEFAULT: |
182 | acl = ext4_iget_acl(inode, &ei->i_default_acl); | 181 | acl = ext4_iget_acl(inode, &inode->i_default_acl); |
183 | if (acl != EXT4_ACL_NOT_CACHED) | 182 | if (acl != ACL_NOT_CACHED) |
184 | return acl; | 183 | return acl; |
185 | name_index = EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT; | 184 | name_index = EXT4_XATTR_INDEX_POSIX_ACL_DEFAULT; |
186 | break; | 185 | break; |
@@ -206,11 +205,11 @@ ext4_get_acl(struct inode *inode, int type) | |||
206 | if (!IS_ERR(acl)) { | 205 | if (!IS_ERR(acl)) { |
207 | switch (type) { | 206 | switch (type) { |
208 | case ACL_TYPE_ACCESS: | 207 | case ACL_TYPE_ACCESS: |
209 | ext4_iset_acl(inode, &ei->i_acl, acl); | 208 | ext4_iset_acl(inode, &inode->i_acl, acl); |
210 | break; | 209 | break; |
211 | 210 | ||
212 | case ACL_TYPE_DEFAULT: | 211 | case ACL_TYPE_DEFAULT: |
213 | ext4_iset_acl(inode, &ei->i_default_acl, acl); | 212 | ext4_iset_acl(inode, &inode->i_default_acl, acl); |
214 | break; | 213 | break; |
215 | } | 214 | } |
216 | } | 215 | } |
@@ -226,7 +225,6 @@ static int | |||
226 | ext4_set_acl(handle_t *handle, struct inode *inode, int type, | 225 | ext4_set_acl(handle_t *handle, struct inode *inode, int type, |
227 | struct posix_acl *acl) | 226 | struct posix_acl *acl) |
228 | { | 227 | { |
229 | struct ext4_inode_info *ei = EXT4_I(inode); | ||
230 | int name_index; | 228 | int name_index; |
231 | void *value = NULL; | 229 | void *value = NULL; |
232 | size_t size = 0; | 230 | size_t size = 0; |
@@ -274,11 +272,11 @@ ext4_set_acl(handle_t *handle, struct inode *inode, int type, | |||
274 | if (!error) { | 272 | if (!error) { |
275 | switch (type) { | 273 | switch (type) { |
276 | case ACL_TYPE_ACCESS: | 274 | case ACL_TYPE_ACCESS: |
277 | ext4_iset_acl(inode, &ei->i_acl, acl); | 275 | ext4_iset_acl(inode, &inode->i_acl, acl); |
278 | break; | 276 | break; |
279 | 277 | ||
280 | case ACL_TYPE_DEFAULT: | 278 | case ACL_TYPE_DEFAULT: |
281 | ext4_iset_acl(inode, &ei->i_default_acl, acl); | 279 | ext4_iset_acl(inode, &inode->i_default_acl, acl); |
282 | break; | 280 | break; |
283 | } | 281 | } |
284 | } | 282 | } |