aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-06-08 21:07:04 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-24 08:17:06 -0400
commit281eede0328c84a8f20e0e85b807d5b51c3de4f2 (patch)
tree9eb0184c7066f27593f2fd75db1593bf688c330f /fs
parent7a77b15d9294749809de918e24bebc39e0fbc9ab (diff)
switch reiserfs to inode->i_acl
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/reiserfs/inode.c4
-rw-r--r--fs/reiserfs/super.c24
-rw-r--r--fs/reiserfs/xattr_acl.c10
3 files changed, 4 insertions, 34 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index 6fd0f47e45db..a14d6cd9eeda 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -1131,8 +1131,6 @@ static void init_inode(struct inode *inode, struct treepath *path)
1131 REISERFS_I(inode)->i_trans_id = 0; 1131 REISERFS_I(inode)->i_trans_id = 0;
1132 REISERFS_I(inode)->i_jl = NULL; 1132 REISERFS_I(inode)->i_jl = NULL;
1133 mutex_init(&(REISERFS_I(inode)->i_mmap)); 1133 mutex_init(&(REISERFS_I(inode)->i_mmap));
1134 reiserfs_init_acl_access(inode);
1135 reiserfs_init_acl_default(inode);
1136 reiserfs_init_xattr_rwsem(inode); 1134 reiserfs_init_xattr_rwsem(inode);
1137 1135
1138 if (stat_data_v1(ih)) { 1136 if (stat_data_v1(ih)) {
@@ -1834,8 +1832,6 @@ int reiserfs_new_inode(struct reiserfs_transaction_handle *th,
1834 REISERFS_I(dir)->i_attrs & REISERFS_INHERIT_MASK; 1832 REISERFS_I(dir)->i_attrs & REISERFS_INHERIT_MASK;
1835 sd_attrs_to_i_attrs(REISERFS_I(inode)->i_attrs, inode); 1833 sd_attrs_to_i_attrs(REISERFS_I(inode)->i_attrs, inode);
1836 mutex_init(&(REISERFS_I(inode)->i_mmap)); 1834 mutex_init(&(REISERFS_I(inode)->i_mmap));
1837 reiserfs_init_acl_access(inode);
1838 reiserfs_init_acl_default(inode);
1839 reiserfs_init_xattr_rwsem(inode); 1835 reiserfs_init_xattr_rwsem(inode);
1840 1836
1841 /* key to search for correct place for new stat data */ 1837 /* key to search for correct place for new stat data */
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c
index b194451fc04b..d3aeb061612b 100644
--- a/fs/reiserfs/super.c
+++ b/fs/reiserfs/super.c
@@ -529,10 +529,6 @@ static void init_once(void *foo)
529 529
530 INIT_LIST_HEAD(&ei->i_prealloc_list); 530 INIT_LIST_HEAD(&ei->i_prealloc_list);
531 inode_init_once(&ei->vfs_inode); 531 inode_init_once(&ei->vfs_inode);
532#ifdef CONFIG_REISERFS_FS_POSIX_ACL
533 ei->i_acl_access = ACL_NOT_CACHED;
534 ei->i_acl_default = ACL_NOT_CACHED;
535#endif
536} 532}
537 533
538static int init_inodecache(void) 534static int init_inodecache(void)
@@ -580,25 +576,6 @@ static void reiserfs_dirty_inode(struct inode *inode)
580 reiserfs_write_unlock(inode->i_sb); 576 reiserfs_write_unlock(inode->i_sb);
581} 577}
582 578
583#ifdef CONFIG_REISERFS_FS_POSIX_ACL
584static void reiserfs_clear_inode(struct inode *inode)
585{
586 struct posix_acl *acl;
587
588 acl = REISERFS_I(inode)->i_acl_access;
589 if (acl && acl != ACL_NOT_CACHED)
590 posix_acl_release(acl);
591 REISERFS_I(inode)->i_acl_access = ACL_NOT_CACHED;
592
593 acl = REISERFS_I(inode)->i_acl_default;
594 if (acl && acl != ACL_NOT_CACHED)
595 posix_acl_release(acl);
596 REISERFS_I(inode)->i_acl_default = ACL_NOT_CACHED;
597}
598#else
599#define reiserfs_clear_inode NULL
600#endif
601
602#ifdef CONFIG_QUOTA 579#ifdef CONFIG_QUOTA
603static ssize_t reiserfs_quota_write(struct super_block *, int, const char *, 580static ssize_t reiserfs_quota_write(struct super_block *, int, const char *,
604 size_t, loff_t); 581 size_t, loff_t);
@@ -612,7 +589,6 @@ static const struct super_operations reiserfs_sops = {
612 .write_inode = reiserfs_write_inode, 589 .write_inode = reiserfs_write_inode,
613 .dirty_inode = reiserfs_dirty_inode, 590 .dirty_inode = reiserfs_dirty_inode,
614 .delete_inode = reiserfs_delete_inode, 591 .delete_inode = reiserfs_delete_inode,
615 .clear_inode = reiserfs_clear_inode,
616 .put_super = reiserfs_put_super, 592 .put_super = reiserfs_put_super,
617 .write_super = reiserfs_write_super, 593 .write_super = reiserfs_write_super,
618 .sync_fs = reiserfs_sync_fs, 594 .sync_fs = reiserfs_sync_fs,
diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c
index 7b3aeb9327d3..b6e473faa8b8 100644
--- a/fs/reiserfs/xattr_acl.c
+++ b/fs/reiserfs/xattr_acl.c
@@ -223,16 +223,15 @@ struct posix_acl *reiserfs_get_acl(struct inode *inode, int type)
223 struct posix_acl *acl, **p_acl; 223 struct posix_acl *acl, **p_acl;
224 int size; 224 int size;
225 int retval; 225 int retval;
226 struct reiserfs_inode_info *reiserfs_i = REISERFS_I(inode);
227 226
228 switch (type) { 227 switch (type) {
229 case ACL_TYPE_ACCESS: 228 case ACL_TYPE_ACCESS:
230 name = POSIX_ACL_XATTR_ACCESS; 229 name = POSIX_ACL_XATTR_ACCESS;
231 p_acl = &reiserfs_i->i_acl_access; 230 p_acl = &inode->i_acl;
232 break; 231 break;
233 case ACL_TYPE_DEFAULT: 232 case ACL_TYPE_DEFAULT:
234 name = POSIX_ACL_XATTR_DEFAULT; 233 name = POSIX_ACL_XATTR_DEFAULT;
235 p_acl = &reiserfs_i->i_acl_default; 234 p_acl = &inode->i_default_acl;
236 break; 235 break;
237 default: 236 default:
238 return ERR_PTR(-EINVAL); 237 return ERR_PTR(-EINVAL);
@@ -288,7 +287,6 @@ reiserfs_set_acl(struct reiserfs_transaction_handle *th, struct inode *inode,
288 struct posix_acl **p_acl; 287 struct posix_acl **p_acl;
289 size_t size = 0; 288 size_t size = 0;
290 int error; 289 int error;
291 struct reiserfs_inode_info *reiserfs_i = REISERFS_I(inode);
292 290
293 if (S_ISLNK(inode->i_mode)) 291 if (S_ISLNK(inode->i_mode))
294 return -EOPNOTSUPP; 292 return -EOPNOTSUPP;
@@ -296,7 +294,7 @@ reiserfs_set_acl(struct reiserfs_transaction_handle *th, struct inode *inode,
296 switch (type) { 294 switch (type) {
297 case ACL_TYPE_ACCESS: 295 case ACL_TYPE_ACCESS:
298 name = POSIX_ACL_XATTR_ACCESS; 296 name = POSIX_ACL_XATTR_ACCESS;
299 p_acl = &reiserfs_i->i_acl_access; 297 p_acl = &inode->i_acl;
300 if (acl) { 298 if (acl) {
301 mode_t mode = inode->i_mode; 299 mode_t mode = inode->i_mode;
302 error = posix_acl_equiv_mode(acl, &mode); 300 error = posix_acl_equiv_mode(acl, &mode);
@@ -311,7 +309,7 @@ reiserfs_set_acl(struct reiserfs_transaction_handle *th, struct inode *inode,
311 break; 309 break;
312 case ACL_TYPE_DEFAULT: 310 case ACL_TYPE_DEFAULT:
313 name = POSIX_ACL_XATTR_DEFAULT; 311 name = POSIX_ACL_XATTR_DEFAULT;
314 p_acl = &reiserfs_i->i_acl_default; 312 p_acl = &inode->i_default_acl;
315 if (!S_ISDIR(inode->i_mode)) 313 if (!S_ISDIR(inode->i_mode))
316 return acl ? -EACCES : 0; 314 return acl ? -EACCES : 0;
317 break; 315 break;